Java RMI method synchronization

Posted by James Moore on Stack Overflow See other posts from Stack Overflow or by James Moore
Published on 2010-04-10T00:31:59Z Indexed on 2010/04/10 0:33 UTC
Read the original article Hit count: 742

Filed under:
|
|

Hello,

I have a class that is stored on the 'server' and multiple clients can call this method. This method returns a class. Now when clients call accessor methods within this class for example a set accessor method. I want the object on the server to be updated and synchronized across all the other clients.

How do I use:

public synchronized setStatus(String s) { this.status = s; }

within java to achieve this.

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about rmi