Advanced Java Programming - Old Questions
12. What is RMI? Differentiate it with CORBA?
Remote Method Invocation (RMI) is a mechanism that allows an object running in one java virtual machine (JVM) to invoke methods on an object running in another java virtual machine (JVM). RMI provides remote communication between java programs. Objects with methods that can be invoked across JVMs are called remote objects. The remote object is called the server object.
Difference between RMI and CORBA
RMI |
CORBA |
RMI is a Java-specific technology. |
CORBA
is independent of programming languages. It
Can access foreign language objects. |
It uses Java interface for implementation. |
It uses Interface Definition Language (IDL) to separate
interface from implementation. |
RMI programs can download new classes from remote JVMs. |
CORBA doesn't have this code sharing mechanism. |
RMI passes objects by remote reference or by value. |
CORBA passes objects by reference. |
RMI uses the Java Remote Method Protocol as its underlying
remoting protocol. |
CORBA use Internet Inter- ORB Protocol (IIOP) as its
underlying remoting protocol. |
The responsibility of locating an object implementation
falls on JVM. |
The responsibility of locating an object implementation
falls on Object Adapter either Basic Object Adapter or Portable Object
Adapter. |
Distributed garbage collection is available integrated with
local collectors. |
No distributed garbage collection is available |
Generally
simpler to use. |
More
complicated. |
It
is free of cost. |
Cost
money according to the vendor. |
|
CORBA
has better scalability. |