5 Replies Latest reply on Sep 2, 2010 10:00 AM by Wolf-Dieter Fink

    How to inject EJBs with custom injector?

    Christian Strempfer Newbie
      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.