Skip to Content
Former Member
Apr 05, 2005 at 06:12 PM

Too dumb for JNDI


Hi there,

apparently I'm too dumb to use JNDI, and I would really appreciate if someone could help me out:

I have a WebDynpro that will be deployed to WAS instance A and that has to lookup an EJB that will be deployed to WAS instance B. A and B do not form a cluster.

I initialize my context like this:


where remoteHost is a String variable containing the host name and port ("blablabla:50004").

Then I try to lookup a bean like this:

Object remoteReference = ctx.lookup("<vendor-prefix>/<application>/<bean>");

The lookup fails with a NamingException, telling me that there are no elements under <vendor-prefix>.

The JNDI tree of WAS B does contain the appropriate entry for the bean, and I have not problems looking it up if both applications reside on B.

What is it I'm missing here? Any hint appreciated!