2 Replies Latest reply on Sep 6, 2012 8:55 AM by Ondra Chaloupka

    Remove EJB-ref from old applications ?

    Max Korn Newbie

      Hi all !

      I have an older Java EE 5 application which is made up of EJB 3 (placed in a jar file) and a Web application. The web application is bundled in an EAR file.

      The web.xml file contains references to the EJB files:

       

      <ejb-ref>

              <ejb-ref-name>ejb/TelcoController</ejb-ref-name>

              <ejb-ref-type>Session</ejb-ref-type>

              <home></home>

              <remote></remote>

      </ejb-ref>

       

      and jboss-web.xml contains as well references to EJB files:

       

      <ejb-ref>

              <ejb-ref-name>ejb/TestController</ejb-ref-name>

              <jndi-name>ejb/TestController/local</jndi-name>

      </ejb-ref>

       

      Now I'm going to port this application to JBoss 7: does it make sense to remove all ejb-refs both in web.xml and jboss-web.xml and replace the Context lookup with with injection ?

       

      @EJB

      TelcoController

       

      Will this work both if the EJB is a remote and if it's a local one ?

      Thanks

      Max