0 Replies Latest reply on Feb 24, 2015 6:36 AM by Pooja K

    Remote JNDI lookup with Jboss EAP 6.3 not working

    Pooja K Newbie

      I am running jboss EAP 6.3 on my local machine. On same machine I am running another application which needs to communicate with jboss bean remotely

      Following is a partial code :

       

            Properties  jndiProperties = new Properties();

              jndiProperties.put(Context.URL_PKG_PREFIXES,"org.jboss.ejb.client.naming");

              jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.remote.client.InitialContextFactory");

              jndiProperties.put(Context.PROVIDER_URL, "remote://127.0.0.1:4447");

               jndiProperties.put(Context.SECURITY_PRINCIPAL, "test");

               jndiProperties.put(Context.SECURITY_CREDENTIALS, "test@123");

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

       

           Context jndiContext = new InitialContext(jndiProperties);

            logger.debug("Created jndiContext" );

       

      My application hangs at InitialContext line...No error in logs...but the debug line "Created jndiContext" not getting printed..

       

      Any help will  be appreciated.

       

      Thanks.

      PK