File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes JNDI for local and remote interfaces: which works? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "JNDI for local and remote interfaces: which works?" Watch "JNDI for local and remote interfaces: which works?" New topic

JNDI for local and remote interfaces: which works?

Leonard Solomyak

Joined: Feb 12, 2003
Posts: 8
I was trying to use Local interfaces with WebSphere 5, specifically with WADS where
I do all development.
To generate entity beans I use bottom-up approach. WASD generated Local interfaces
by default, with the associated JNDI names.
I can use Universal Client to access beans' methods via the Local interfaces but the
problem occures when I put the LOOKUP implementation code into the bean.
In my case a session bean creates an entity bean inside one container. Apparently
JNDI refused to work: NamingException was thrown, saying that the specified in the lookup
JNDI name not found.
I tryed different values for the JNDI name, which I can see in the descriptors but all unsuccessfully.
The JNDI name got resolved only when I added remote interfaces to the entity bean. WSAD by default
readdressed JNDI name in from local to the remote home interface.
I am asking
1. How can I use local interfaces via JNDI service in WSAD and WAS 5 ?
2. How can I use JNDI service for remote and local interfaces for the same bean ?
Liz Lee

Joined: Feb 23, 2003
Posts: 6
I have the same problem. Have you had any solution?
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Dagnabit, I know the solution to this, but I don't have access to a WSAD or WAS environment to test it. I beleive you have to create a reference to the second bean in the descriptor for the first and then you will be able to reference it. Have a look at the reference tab in the deployment descriptor in WSAD and search around there.
Not a great solution, but I hope it helps.
Andre Mermegas
Ranch Hand

Joined: Jun 20, 2001
Posts: 158
Here are two good links that will help:
and this one has the rest of his howto's

--=( Andre Mermegas )=--
I agree. Here's the link:
subject: JNDI for local and remote interfaces: which works?
It's not a secret anymore!