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.