Another approach for connecting RMI objects to non-Java objects is the ability for RMI objects to communicate directly with remote CORBA objects using IIOP , the CORBA network interface protocol. The standard RMI implementation provided with Java uses an RMI-specific protocol, JRMP, to communicate over the network. RMI/IIOP allows RMI objects to use the CORBA network protocol, IIOP, to communicate with other objects. This means that an RMI object using RMI/IIOP can communicate with a remote CORBA object, regardless of the implementation language of the CORBA object. Likewise, a CORBA object can interact with your Java RMI objects directly. This really gives you the best of both worlds, since you can then implement your remote clients using RMI and use either CORBA or RMI/JNI on the server to interface to any native legacy code.
In order to convert your RMI objects to use IIOP, you need to make some changes:
Any implementation classes should extend
All your stub and skeleton classes need to be regenerated
using the updated rmic compiler provided with
the RMI/IIOP installation. This updated compiler has an
-iiop option that produces stubs and
ties (ties refers to skeletons in the CORBA
vernacular). These stubs and ties handle the link between client
and server objects, but use IIOP rather than JRMP.
All use of the RMI
Naming registry has to be converted to use of JNDI to ...