1 Reply Latest reply on May 21, 2013 11:41 AM by Wolf-Dieter Fink

    Jboss 7 and the global JNDI

    A I Newbie

      Hello,

       

      I use JBoss 7.1 and did NOT understand the support of the global JNDI in "Remote application clients" of the global JNDI in JBOSS 7.1.

       

      When I use the JNDI java:global/my-ear/my-ejb/BMPFacadeBean!my.domain.service.IBMPFacadeRemote

       

      I get the error

       

       

      testBMPProcessCommit(my.domain.itest.BMPIntegrationIT)  Time elapsed: 0.34 sec  <<< ERROR!

      javax.naming.NameNotFoundException: global/my-ear/my-ejb/BMPFacadeBean!my.domain.service.IBMPFacadeRemote -- service jboss.naming.context.java.jboss.exported.global.my-ear.my-ejb."BMPFacadeBean!my.domain.service.IBMPFacadeRemote"

               at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)

               at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)

               at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)

               at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)

               at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

               at java.lang.Thread.run(Thread.java:662)

       

       

       

       

      I want also to mention that JNDI ejb:my-ear/my-ejb//BMPFacadeBean!my.domain.service.IBMPFacadeRemote works just fine.

      Also I have tried other JNDI names displayed when the EAR is deployed: it does not work!!!

       

       

      1.What is the current status of implmenting the global JNDI for remote clients?

      2. What is up with other JNDI names used in Remote Clients?

       

      I use the following Properties when obtaining the Context (without jndi.properties):

       

      env = new Properties();

       

      env.setProperty( "java.naming.factory.initial", "org.jboss.naming.remote.client.InitialContextFactory");

      //env.setProperty( "java.naming.factory.initial", "org.jboss.as.naming.InitialContextFactory");

      //env.put("jboss.naming.client.ejb.context", true);

      env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

      env.setProperty( "java.naming.provider.url", "remote://localhost:4447");

      env.put(Context.SECURITY_PRINCIPAL, "user");

      env.put(Context.SECURITY_CREDENTIALS, "apassword");