aspose file tools*
The moose likes Distributed Java and the fly likes Is there only one remote object instance serving all clients Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Is there only one remote object instance serving all clients" Watch "Is there only one remote object instance serving all clients" New topic
Author

Is there only one remote object instance serving all clients

Pushker Chaubey
Ranch Hand

Joined: Dec 06, 2006
Posts: 53
Hi Friends,

When multiple clients invoke a remote method on the same remote object, are all these methods invoked on the same instance.
Can we use remote object's field memebers to maintain state between remote method invocations?


Regards,<br />Pushker<br /> <br />SCBCD 5.0 90%<br />SCWCD 5.0 89%<br />SCJP 5.0 90%
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Yes, the server(remote) object is always the one that you have bound in the registry. All the remote calls from the client ends up into this object.

So, you can actually use the instance field of the remote object to maintain state. However, be sure that your remote object is thread-safe.


apigee, a better way to API!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there only one remote object instance serving all clients
 
Similar Threads
How many Objects of remoteData
Doubt regarding EJBMetaData Vs Reflection API
RMI and object and thread sharing
Singleton or static?
synchronized in local mode