I have an ejb deployed to a websphere cluster that needs to call another EJB that is deployed to another websphere cluster as a part of a different .ear file. What is the correct way to locate the name of the second EJB in this environment? I am able to do the following:
Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory"); env.put(Context.PROVIDER_URL, "iiop://clusterServerA.domain.com:9814"); Context initialContext = new InitialContext(env);
where the provider URL refers to the bootstrap port for a member of the cluster. I'm not comfortable refering directly to the machine this way (what if this node in the cluster is unavailable?). So what is the prefered way to do this?