3 Replies Latest reply on Jul 2, 2012 9:21 AM by mac2009

    Problem with JNDI-Name lookup (EJB 2.1; migration from 4.0.5.GA to 7.1.1.Final)

    mac2009

      Hello,

       

      i have read infos like https://docs.jboss.org/author/display/AS7/How+do+I+migrate+my+application+from+AS5+or+AS6+to+AS7?_sscc=t

      but I still can't find the right configuration for the EJB JNDI names.

      Example:

      JBoss 4.0.5 JNDI name looks like jndi-name="authob/SecuritiesOB"

       

      When deploying the ear JBoss 7.1.1 lists the following JNDI bindings

      java:global/MyAppCMP-extern/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBHome

      java:app/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBHome

      java:module/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBHome

      java:jboss/exported/MyAppCMP-extern/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBHome

      java:global/MyAppCMP-extern/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBLocalHome

      java:app/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBLocalHome

      java:module/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBLocalHome

      java:global/MyAppCMP-extern/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBLocal

      java:app/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBLocal

      java:module/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOBLocal

      java:global/MyAppCMP-extern/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOB

      java:app/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOB

      java:module/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOB

      java:jboss/exported/MyAppCMP-extern/myApp-ejb-4.3.0-SNAPSHOT/SecuritiesOB!com.customer.myApp.authob.interfaces.SecuritiesOB

       

      Only the last JNDI binding (java:jboss/exported/...) works.

      I guess the binding java:module/... should work as well or lets say, I would prefer to use this one.

       

      Maybe a problem of ear packaging?

      How does the ear packaging/structure should look like?

      EAR:

      Contains the ejb.jar and web.war. All other libs are packaged to the lib folder. Manifest classpath entry has same structure.

       

      JAR (EJBs; interfaces and descriptors generated with xdoclet):

      META-INF: Empty manifest, jboss.xml (ignored), jbosscmp-jdbc.xml (any migration issue???) and ejb-jar.xml

       

      WAR:

      Manifest classpath entry contains ejb.jar and several other libs.

      WEB-INF/lib: heaps of libs

       

      Do you need more information in detail?

       

      Cheers

      Carsten