Why do we use PortableRemoteObject.narrow() method?


EJB programming & troubleshooting: Why do we use PortableRemoteObject.narrow() method?

  1. Why do we use PortableRemoteObject.narrow()?
    I read about PortableRemoteObject.narrow() at many places, but I didn't understand the concept.
    Can any body explain in simple form?
  2. Some remoting technologies, unlike RMI, do not support remote polymorhpism. CORBA is one of them. Because CORBA wasn't design to work in a dynamic class loading environment (not exclusively anyway) it wasn't possible for it to implement this feature. Therefore, if you want to get an actual type rather than the declared type you have to narrow the stub yourself.
    J2EE is generally designed to support transports other than RMI (such as CORBA' IIOP), you in order to be compatible you have to comply with these standards as well.

  3. Gr8 !! u had given a very good explanation...
  4. good answer !
  5. I understood your explanation
    and thank you for your great explanation.