JBoss Community

Re: Problems with JBoss 7 and remote-interface lookup with context

created by Gary Quinn in Beginner's Corner - View the full discussion

I still can't get mine to work.

 

This is from my log file:

 

13:08:53,436 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named DepartmentServiceImpl in deployment unit subdeployment "server.jar" of deployment "quinn_ear.ear" are as follows:

 

 

          java:global/quinn_ear/server/DepartmentServiceImpl!za.co.quinn.service.DepartmentService

          java:app/server/DepartmentServiceImpl!za.co.quinn.service.DepartmentService

          java:module/DepartmentServiceImpl!za.co.quinn.service.DepartmentService

          java:global/quinn_ear/server/DepartmentServiceImpl

          java:app/server/DepartmentServiceImpl

          java:module/DepartmentServiceImpl

 

Here is my code:

 

Hashtable props = new Hashtable();

props.put("java.naming.factory.initial", "org.jboss.as.naming.InitialContextFactory");

props.put("java.naming.provider.url", "jnp://localhost:1099");

 

 

InitialContext initialContext = new InitialContext(props);

DepartmentService bean = (DepartmentService)     initialContext.lookup("java:global/quinn_ear/server/DepartmentServiceImpl!za.co.quinn.service.DepartmentService");

 

The exception is:

 

javax.naming.NameNotFoundException: Name 'global' not found in context ''

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community