5 Replies Latest reply on Nov 4, 2014 7:09 AM by wdfink

    Using java EE 6 portable jndi names

    zizou84

      Hi

      I am testing ejb 3.1 under jboss 7.1.0 .

       

      I deployed an ejb (jar) and when starting jboss,i cann see that my ejb is well deployed under this jndi names:

      java:global/myEjb/TestEjb!formation.ejb.TestEjbRemote
          java:app/myEjb/TestEjb!formation.ejb.TestEjbRemote
          java:module/TestEjb!formation.ejb.TestEjbRemote
          java:jboss/exported/myEjb/TestEjb!formation.ejb.TestEjbRemote
          java:global/myEjb/TestEjb
          java:app/myEjb/TestEjb
          java:module/TestEjb
      
      

      But the problem is when calling my ejb from remote java se application: i am using  java:global/myEjb/TestEjb!formation.ejb.TestEjbRemote to lookup

      my ejb but i always get javax.naming.NameNotFoundException

       

      I am using:

       

      context = new InitialContext();
      
      
      

       

      Here is my jndi.properties:

      java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
      java.naming.provider.url=remote://localhost:4447
      java.naming.security.principal=userEjb
      java.naming.security.credentials=userEjbPass
      remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
      

       

      What is the problem?