Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Object modified on server end is not reflected in the client?

843793Aug 20 2003 — edited Aug 22 2003
I have an RMI demo running based on the tutorial.

It appears my object from the client side is being passed across the network and being executed on the server side. However, in the client code I check the state of the object I passed and the changes do not exist on the client side. The changes only appear to exist on the server side.

So it's like the object I passed exists in two places. On the client, where it's empty, and on the server, where the values in the object have been set.

I worked around the problem by having the server return an Object. So I just return the Object back to the client and it behaves as I want.

I guess it's like by using RMI the object is being passed by value rather than by reference. I sort of thought that the whole point of RMI is that you code as if the RMI portion is totally transparent.

I'll go read the tutorial again but if someone could explain what's going on in this case it would be a big help.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2003
Added on Aug 20 2003
6 comments
112 views