aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JNDI  Lookup running on another Machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JNDI  Lookup running on another Machine" Watch "JNDI  Lookup running on another Machine" New topic
Author

JNDI Lookup running on another Machine

Murugan R
Greenhorn

Joined: Aug 14, 2001
Posts: 1
I tried a sample ejb provided with the J2ee1.3 beta release
(the jms api and a jms server are included in j2ee1.3) using JRUN 3.1.
From the Client Side i have the code like:
Properties env = new Properties();
env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "allaire.ejipt.ContextFactory");
env.setProperty(Context.PROVIDER_URL, "ejipt://servername:2323");
env.setProperty(Context.SECURITY_PRINCIPAL, request.getParameter("User"));
env.setProperty(Context.SECURITY_CREDENTIALS, request.getParameter("Password"));
home =( Home )( javax.rmi.PortableRemoteObject.narrow( ( new InitialContext(env) ).lookup( "java:comp/env/ejb/beanname" ),Home.class);
When the servername is Localhost , it is working fine.
When i try to lookup a bean running on another machine, i m getting the error like:
--------------------------------------------
JNDI lookup failed: javax.naming.CommunicationException: Can't find ServerName.
---------------------------------------------
But the Server name is available. And it is Communicating well when i made DB access.
Could anyone help ?

[This message has been edited by Murugan R (edited August 14, 2001).]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16303
    
  21

Try using the server's IP address instead. That is, replace "ejipt://servername:2323" with "ejipt://192.168.1.213:2323" (or whatever "servername"s IP is.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNDI Lookup running on another Machine