A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
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!
Don't get me started about those stupid
subject: Is there only one remote object instance serving all clients
How many Objects of remoteData
synchronized in local mode
Doubt regarding EJBMetaData Vs Reflection API
Singleton or static?
RMI and object and thread sharing
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014