File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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!
 
Don't get me started about those stupid light bulbs.
 
subject: Is there only one remote object instance serving all clients