문제

I want to know if it is possible to pass an object by reference with java RMI.

To be more specific I want to do something like this

Client end:

server.getSomeitem(someitemID).getSomeOtherItem(otherItemId).setItemValue(String someValue);

Where on the server end the getsomeitem object returns an object with the index that is sent in, then off of that object call getsomeotheritem from that index then call setItemValue on that object.

I want this to affect that values on the server side and not just sent a copy of the objects to the client.

Is this possible?

도움이 되었습니까?

해결책

If the object concerned is an exported remote object its (remote) reference will be passed. Otherwise the entire object is passed by value copy via Serialization.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top