JBoss Community

How to inject EJBs with custom injector?

created by Christian Strempfer in EJB 3.0 - View the full discussion
I have a distributed environment and a service locator, which can  locate all EJBs on different servers. Is it possible to use the standard @EJB-Annotation, but  make the lookup on my own?

 

For example:

@javax.ejb.EJB(name = "ejb/TestService")
private TestService testService;

Should trigger:

return ServiceLocator.findEJBService(TestService.class, "ejb/TestService")
My intention is to keep the deployment transparent for the developers. They can use @EJB as normal, but will end up using the service locator.

Reply to this message by going to Community

Start a new discussion in EJB 3.0 at Community