aspose file tools*
The moose likes Websphere and the fly likes Access different server through jndi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Access different server through jndi" Watch "Access different server through jndi" New topic
Author

Access different server through jndi

Peter Kovgan
Ranch Hand

Joined: Sep 18, 2003
Posts: 84
Hi!
I need your help urgently!!
I�m trying to accees ejb on server B from servlet on server A.
(A and B are cluster)
I need to connect from one server to another in cluster.
How to do it?
I�m doing lookup with path
�cell/nodes/NodeName/servers/serverA/ejb/com/bmc/wsm/peter/test/TestJndiHome�
Then lookup with path:
�cell/nodes/NodeName/servers/serverB/ejb/com/bmc/wsm/peter/test/TestJndiHome�
But every time only ejb on server A affected.

The code below:


I know that I should obtain initial context of server B to access it, but I have no idea what are properties that I should write.

I have WAS 5.1 ND, should I write in properties ORB host/port of server B?
Where can I find this port?
Please, help!
Many Thanks!!!
Salomon Zalzman
Greenhorn

Joined: Mar 03, 2005
Posts: 9
Using compound names (such as you are)for JNDI bindings is the recommended way for WAS v5 since it introduced the Federated name space concept, however, you seem to have a special need to go to Server B in your case.

You might want to try instead to use a Corbaname of the form:

corbaname::myhost1:9812/NameServiceServerRoot#ejb/com/bmc/wsm/peter/test/TestJndiHome

You can find the "Endpoints" (ports) under the server configuration. From the WebSphere admin console, select "Application Servers", click on the server in question (Server B) and click on EndPoints. You'll find a listing of ports such as SOAP and the Bootstrap address.

Hope this helps.

Salomon Zalzman
Versant Corporation
http://www.versant.com
Salomon Zalzman
Greenhorn

Joined: Mar 03, 2005
Posts: 9
You may find useful information in chapter 10 of the redbook "IBM WebSphere Application Server v5.1 System Management and Configuration".

You can get the book at http://www.redbooks.ibm.com/redbooks/pdfs/sg246195.pdf

Salomon Zalzman
Versant Corporation
http://www.versant.com
Peter Kovgan
Ranch Hand

Joined: Sep 18, 2003
Posts: 84
Thank you, Salomon!

Happy holiday!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access different server through jndi