Specifying a remote EJB on another Application Server
 Technote (FAQ)
 
Problem
How do you specify a remote EJB on another Application Server?
 
Solution
If the EJB is on another Application Server within the same domain, there is no special action required. Because of WebSphere's distributed name space, a JNDI lookup for an EJB to any admininstration server will return the correct home as long as the EJB exists anywhere in that domain.
If the EJB is in another domain, then set the Context.PROVIDER_URL in the code where you do the EJB lookup as follows:

Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "iiop://EJBHost");
Context context = new InitialContext(env);

where EJBHost is the host where the callee EJB resides. The default value of Context.PROVIDER_URL is localhost. You can also choose to use some other naming service by setting the Context.INITIAL_CONTEXT_FACTORY.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > EJB Container
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1054313
IBM Group: Software Group
Modified date: Jul 8, 2002