EJB programming & troubleshooting: difference in lookup process
- Posted by: kirubakaran damodaran
- Posted on: March 21 2005 23:25 EST
what is difference in following two lookup code.
Context ic= new InitialContext();
Object obj = ic.lookup("JNDI");
HelloHome home = (HelloHome)PortableRemoteObject.narrow(obj,HelloHome.class);
IntialContext ic= new InitialContext();
HelloHome home = (HelloHome)ic.lookup("JNDI");
The first is used to lookup remote home interfaces (because RMI IIOP), while the second for local homes. See details in any EJB books.