Search code examples
javarmiiiop

Unicast Vs Portable Remote Object


What is the basic difference between java.rmi.server.UnicastRemoteObject and java.rmi.PortableRemoteObject.

I know that one is used for JRMP and the other for IIOP,but can anyone explain it in a lay man's language.I'm new to Java.Also can we use a Protable Remote Object for JRMP? If not,why?


Solution

  • http://download.oracle.com/javase/6/docs/technotes/guides/rmi-iiop/rmi_iiop_pg.html

    When do I use UnicastRemoteObject vs PortableRemoteObject?

    UnicastRemoteObject should be used as the superclass for the object implementation in RMI programming. PortableRemoteObject should be used in RMI-IIOP programming. If PortableRemoteObject is used, you can switch the transport protocol to either JRMP or IIOP during runtime.