Question

I have a Server and a Client communicating using RMI, and I have several classes implementing the Remote interface.

The client receives the proxies with no problems, but when I send one of this proxy objects as a parameter of another RMI method call, the method at the server receives a reference of the proxy and not the reference of "real object", that resides in the same JVM.

Is it possible to receive the real object instance as parameter in the server (That is, by having the JVM handle automatically the conversion)? Receiving a proxy to a local object doesn't make much sense to me.

Thanks in advance!

Was it helpful?

Solution

No this is not possible. You are using RMI, you are stuck with its defined semantics. If you want a reference to the actual object you will have to organize it yourself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top