This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I have deployed a EJB on serve1 & trying to looup it from server2 placed on same machine. ( server1 & server2 are test environments of websphere). I have the following code in servlet of server2
hashtable.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory"); hashtable.put(Context.PROVIDER_URL, "iiop://localhost:2810/"); Context context = new InitialContext(hashtable); context.lookup("ejb/com/ejb/MyEJBHome"); // MyEJBHome is deployed in server1
when this code excutes I have exception "javax.naming.NameNotFoundException: ejb/com/ejb/QqqHome. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound". What are the exact parameters that I should provide for Context.INITIAL_CONTEXT_FACTORY & Context.PROVIDER_URL so that I will not have the exception.