2 Replies Latest reply on Nov 8, 2013 7:24 AM by frankvanorshoven

    How does Jboss 7 AS registers JNDI

    frankvanorshoven

      I've a simple session bean which implements a remote interface.

       

          @Remote(LTextsEjbRemote.class)

          @Stateless(mappedName = "LTextsEjb")

          public class LTextsEjbBean implements LTextsEjbRemote {

          ...

          }

       

      Above bean and it's interface is packaged in a jar. This jar is then deployed in JBoss 7 correctly. I can access the bean remotely from a client application. On the console I can see how JBoss registers the bean in the JNDI.

       

           JNDI bindings for session bean named LTextsEjbBean in deployment unit deployment "ecospeedtext-1.0.jar" are as follows:

         

          java:global/ecospeedtext-1.0/LTextsEjbBean!com.ecospeed.text.ejb.LTextsEjbRemote

          java:app/ecospeedtext-1.0/LTextsEjbBean!com.ecospeed.text.ejb.LTextsEjbRemote

          java:module/LTextsEjbBean!com.ecospeed.text.ejb.LTextsEjbRemote

          java:jboss/exported/ecospeedtext-1.0/LTextsEjbBean!com.ecospeed.text.ejb.LTextsEjbRemote

          java:global/ecospeedtext-1.0/LTextsEjbBean

          java:app/ecospeedtext-1.0/LTextsEjbBean

          java:module/LTextsEjbBean

         

           JNDI bindings for session bean named LTextsEjb in deployment unit deployment "ecospeedtext-1.0.jar" are as follows:

         

          java:global/ecospeedtext-1.0/LTextsEjb!com.ecospeed.text.ejb.LTextsEjbRemote

          java:app/ecospeedtext-1.0/LTextsEjb!com.ecospeed.text.ejb.LTextsEjbRemote

          java:module/LTextsEjb!com.ecospeed.text.ejb.LTextsEjbRemote

          java:jboss/exported/ecospeedtext-1.0/LTextsEjb!com.ecospeed.text.ejb.LTextsEjbRemote

          java:global/ecospeedtext-1.0/LTextsEjb

          java:app/ecospeedtext-1.0/LTextsEjb

          java:module/LTextsEjb

       

       

      The jar which contains the session bean will need to access other jars, so I need to package all the jars in an EAR file.

      When I deploy this ear file, I don't see JBoss registering the session bean in the JNDI anymore. Also, the remote client is not working anymore. It throws an exception:

      javax.naming.NameNotFoundException

      My question :  why is JBoss not registering the beans anymore ... or better ... what do I have to do so that JBoss sees the beans and registres them in JNDI ?

       

      Many thanks,  Frank