As mentioned by 'fnt' OSGI could be a solution for your issue.
What you could also do is, using remote EJBs.
Your remote service in a separately deployed jar
@Stateless
@Remote(MyRemoteInterface.class)
public class MyService implements MyRemoteService {
// Some implementations
}
Shared api
interface MyRemoteService {
}
In some Module in your EAR
@Stateless
public class MyBoundary {
@EJB
MyRemoteService service;
// Stuff
}
For further information see here