Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access different server through jndi

 
Peter Kovgan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Salomon!

Happy holiday!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic