Discussions

EJB programming & troubleshooting: difference in lookup process

  1. difference in lookup process (1 messages)

    Hi All,

    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");


    regards
    kirubakaran
  2. The first is used to lookup remote home interfaces (because RMI IIOP), while the second for local homes. See details in any EJB books.