WAS v8.5 > Reference > Developer best practicesJNDI interoperability considerations
You must take extra steps to enable your programs to interoperate with non-product JNDI clients and to bind resources from MQSeries to a namespace.
EJB clients running in an environment other than WAS accessing EJB applications running on product servers
When an EJB application running in WebSphere Application Server is accessed by a non-product EJB client, the JNDI initial context factory is presumed to be a non-product implementation. In this case, the default initial context is the cell root. If the JNDI service provider being used supports CORBA object URLs, the corbaname format can be used to look up the EJB home.
- Single server
- Following is a URL that has the bootstrap host myHost, the port 2809, and the enterprise bean installed in the server server1 in node node1 and bound in that server under the name myEJB:
initialContext.lookup( "corbaname:iiop:myHost:2809#cell/nodes/node1/servers/server1/myEJB");- Without CORBA object URL support
- If the JNDI initial context factory being used does not support CORBA object URLs, the initial context can be obtained from the server, and the lookup can be performed on the initial context as follows:
Hashtable env = new Hashtable(); env.put(CONTEXT.PROVIDER_URL, "iiop://myHost:2809"); Context ic = new InitialContext(env); Object o = ic.lookup("cell/clusters/myCluster/myEJB");
Binding resources from MQSeries 5.2
In releases previous to WAS v5.0, the MQSeries jmsadmin tool could be used to bind resources to the namespace. When used with a WAS namespace, the resource is bound within a transient partition in the namespace and does not persist past the life of the server process. Instead of binding the MQSeries resources with the jmsadmin tool, bind them from the dmgr console, under Resources in the console navigation tree.
Related concepts:
Configured name bindings
Related
Develop applications that use JNDI
Reference:
Lookup names support in deployment descriptors and thin clients
Related information:
Naming in WAS V5: Impact on Migration and Interoperability