File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Is there only one remote object instance serving all clients
Joined: Dec 06, 2006
Nov 04, 2008 04:25:00
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%
Joined: Feb 25, 2007
Nov 04, 2008 05:47:00
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.
, a better way to API!
I agree. Here's the link:
subject: Is there only one remote object instance serving all clients
Singleton or static?
Doubt regarding EJBMetaData Vs Reflection API
synchronized in local mode
RMI and object and thread sharing
How many Objects of remoteData
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013