0

Can RMI (JRMP) server be called by RMI IIOP?

I know that RMI IIOP is used for cross language communication using corba, But can RMI server implemented using JRMP be called by RMI IIOP client?

I'm guessing this is possible by using the IP address of RMI (JRMP) registry host.

Raju Kumar
  • 1,255
  • 3
  • 21
  • 39

1 Answers1

1

No. The question doesn't even make sense. An RMI server is called via its stub, and the protocol is implemented by the stub, not the client.

However you can export the same object as both an RMI/JRMP remote object and an RMI/IIOP remote object, by extending neither UnicastRemoteObject nor PortableRemoteObject and calling the exportObject() methods of both those classes, and registering it in both an RMI Registry and a COSNaming service, and running both rmic (if necessary, see the preamble to UnicastRemoteObject) and rmic -iiop.

Then if you look it up via a Registry you get an RMI/JRMP stub, and if you look it up via a COSNaming service you get an RMI/IIOP stub.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • Ahh k... What are the differences between RMI and RMI-IIOP beside the registry and cross language accessibility? – Raju Kumar Jun 15 '12 at 10:53
  • @RajuKumar Completely different protocols and APIs, hidden to some extent by RMI/IIOP; no DGC in RMI/IIOP; different serialization requirements; and IMHO RMI/IIOP was and is considerably more mature than RMI/JRMP. Hence no doubt the ORB vendor's insistence on using IIOP for J2EE. For example scalability, interception, etc. are all a doddle under the CORBA model, where they are barely possible at all in RMI/JRMP. Activation is also considerably better thought out in the CORBA model, where in RMI/JRMP it just has a number of gaping holes, such as security, that make it basically unusable. – user207421 Jun 15 '12 at 12:03