Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

URL for InitialContext when runnining EJBs in the WAS cluster

320 views
Skip to first unread message

Gennadiy Civil

unread,
Jan 26, 2005, 2:46:35 PM1/26/05
to
Hello:

We have EJBs that need to run in the WAS cluster.

Normally when we specify URL for InitialContext for EJBs we could put
something like this:
corbaloc:iiop:10.0.0.88:9812 where 10.0.0.88 is IP address/port of the
ORB Bootstrap port - correct?

When my EJBs run in the cluster there are two physical IP addresses. Can
I specify these addresses as a comma-separated list? For example
corbaloc:iiop:10.0.0.21:9810,corbaloc:iiop:10.0.0.22:9812

I don’t know if this is legal for WebSphere...

Could you please advise.

Should we create round-robin DNS name? In that case how do we handle
different ports for the nodes in the cluster?

Any help is appreciated

Thanks
Gennadiy

Sven-Jürgen Lämke

unread,
Jan 30, 2005, 5:07:35 AM1/30/05
to
Hi,
 
see the following example:
 
prop.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
prop.put(Context.PROVIDER_URL, "corbaloc::host1:2809,:host2:2809");
Context initialContext = new InitialContext(prop);
try { java.lang.Object myHome = initialContext.lookup("cell/clusters/MyCluster/MyEJB");
myHome = (myEJBHome) javax.rmi.PortableRemoteObject.narrow(myHome, myEJBHome.class);
} catch (NamingException e) { }
 
More info in IBM WebSphere V5.0 Performance, Scalability, and High Availability WebSphere Handbook Series (sg246198)
 
No round robin DNS required !
 
Regards
 
Sven
 
 
 
"Gennadiy Civil" <gci...@salmonllc.com> schrieb im Newsbeitrag news:ct8s2v$743i$1...@news.boulder.ibm.com...

clec...@pobox.com

unread,
Mar 21, 2005, 7:04:51 PM3/21/05
to
Hello Gennadiy,

The PROVIDER_URL tells defines the address of the Naming Service.
This can be the Naming Service of the application server, the node or
the deployment manager.
The listening port is defined by the BOOTSTRAP_ADDRESS.host property
in Websphere Admin console / End Points.
The PROVIDER_URL property is NOT linked to your ejb (and thus is NOT
linked to the load balancing of your ejb).

When you perform your lookup, the Naming Service returns you a
reference to your ejb (this reference is called an IOR - Interoperable
Object Reference- in CORBA world).
In a clustered configuration, the reference will be load balanced.
It is behind the scene. WLM plugin (Work Load Management) and LSD
(Location Service Daemon) are involved on the server to enable load
balancing of ejbs.

Let's come back to the PROVIDER_URL. If you give several locations
with a "corbaloc::myhost1:9810,:myhost1:9811,:myhost2:9810", you will
get fail over of the Naming Service (it should also load balance).
-> This Naming Service failover is NOT linked to the load balancing of
your ejb.
-> You can get load balancing of your ejb even if you specify a
PROVIDER_URL with one single Naming Service.

One more point : "corbaloc" and "corbaname" are defined in
CORBA/IIOP specification and are supported by websphere implementation
of IIOP, you can get more docs at
http://www.iona.com/devcenter/corba/corbaloc.pdf

Hope this helps,

Cyrille.

-------------------------------
Cyrille Le Clerc
cleclerc at pobox dot com
-------------------------------

0 new messages