Sanath
Sanath

Reputation: 4886

tomcat JNDI loking up remote EJBs

I have a jboss and a tomcat installed in the same machine (with jboss 6 having port 8080 and tomcat 7 having port 8090) and I am trying to use JNDI lookup from tomcat to obtain the ejb lookups in JBoss. I have checked my EJB beans using the jmx console to make sure they are available. I have denoted them to be @Remote and in JMX console these EJBs are avilable as aaaServiceRemote/remote bbbServiceRemote/remote etc

I my tomcat, I have put my application war which consists a Service locator and when the application starts the service locator tries to find the EJBs and fails. I have put jnp-client and jboss-all-client jar files copied from jboss/client to tomcat/lib folder I have put a jndi.properties file inside the webapp directory of tomcat consisting of the following entries.

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

it seems that tomcat is trying to find the EJBs in its JNDI context not the remote jboss JNDI context.

any help on how this remote looking up can be enabled please.

Upvotes: 0

Views: 3041

Answers (1)

Mark Bramnik
Mark Bramnik

Reputation: 42471

it looks like your jndi.properties file is not read properly. Have you tried to see whether these properties are passed to the InitialContext object when you create a first JNDI lookup?

What the debug reveals?

Upvotes: 1

Related Questions