Clustered service is a vendor-specific implementation.  Some have a 2-branch
structure, local and global JNDI trees;  others use duplicated global JNDI
tree, etc...  Hence the proper way to perform lookup is also
vendor-dependent.

This indeed is a J2EE spec sore spot that requires remedy:  standard
implementation of clustered service binding and lookup.

Gene Chuang
Kiko.com


-----Original Message-----
From: Catalfano Anthony [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 23, 2001 2:14 PM
To: [EMAIL PROTECTED]
Subject: JNDI and server cluster


Can anyone tell me how you reference a server cluster that is serving up the
same beans?
What does the PROVIDER_URL look like when you're referencing  a cluster?
I'm doing something like the following.

          java.util.Hashtable properties = new java.util.Hashtable(2);

            // remote server
            properties.put(javax.naming.Context.PROVIDER_URL,
"iiop://xxx.xxx.xxx.xxx:900/");

            // local name server
            properties.put(javax.naming.Context.PROVIDER_URL, "iiop:///");

            properties.put(
                javax.naming.Context.INITIAL_CONTEXT_FACTORY,
                "com.ibm.ejs.ns.jndi.CNInitialContextFactory");

            // IBM name services
            javax.naming.InitialContext initContext =
                new javax.naming.InitialContext(properties);

            // home
            Object objref = initContext.lookup("AccountBMPSFSB/SFSB");
            AccountBMPSFSB.SFSBHome home =
                (AccountBMPSFSB.SFSBHome)
javax.rmi.PortableRemoteObject.narrow(
                    objref,
                    AccountBMPSFSB.SFSBHome.class);

            bean = home.create();


Anthony Catalfano
Information Technology Analyst
Application Management Services
400 19th Street
Moline, IL  61265-1337
phone:  (309) 748-5201
fax:    (309) 765-4128

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to