| View previous topic :: View next topic |
| Author |
Message |
Michael Justin Guest
|
Posted: Fri Aug 20, 2004 11:14 am Post subject: Do i have to use 'synchronized' for server methods? |
|
|
Hello newsgroup,
in my RMI server object, i use a HashTable to manage session objects
which allow to set/get a session-ID, some 'session values' and other
things for each connected client.
Do i have to make the getSessionValue / setSessionValue methods
synchronized or does RMI synchronize the access to these server methods
somehow "automagically"?
Thanks in advance!
Mike
|
|
| Back to top |
|
 |
Michael Justin Guest
|
Posted: Wed Sep 08, 2004 5:07 pm Post subject: Re: Do i have to use 'synchronized' for server methods? |
|
|
Brenton Camac wrote:
| Quote: | If multiple RPC requests arrive at the RMI server concurrently for the
same RMI object then there will be concurrent invocations on that
object.
|
Instead of one remote RMI object on the server which is shared by all
clients, i could create a factory method in the server which creates one
server-side RMI object for every client. So this object would be used
exclusively by the client who creates and holds a reference to it? Could
be simple to implement and use.
Michael
|
|
| Back to top |
|
 |
Mo Tahmasebi Guest
|
Posted: Tue Jan 04, 2005 10:06 pm Post subject: Re: Do i have to use 'synchronized' for server methods? |
|
|
Sorry guys but I did not get the reply to this question! Could you let me
know the answer too?
Thanks
Mo
"Michael Justin" <michael.justin (AT) postkasten (DOT) de> wrote
| Quote: | Hello newsgroup,
in my RMI server object, i use a HashTable to manage session objects
which allow to set/get a session-ID, some 'session values' and other
things for each connected client.
Do i have to make the getSessionValue / setSessionValue methods
synchronized or does RMI synchronize the access to these server methods
somehow "automagically"?
Thanks in advance!
Mike
|
|
|
| Back to top |
|
 |
Paul Furbacher [TeamB] Guest
|
Posted: Fri Jan 07, 2005 4:07 am Post subject: Re: Do i have to use 'synchronized' for server methods? |
|
|
Mo Tahmasebi wrote:
| Quote: | Sorry guys but I did not get the reply to this question! Could you
let me know the answer too?
|
The best thing to do is to check the archives
to see whether anyone answered the question.
If not, it could be that no one really has
a good answer.
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
|
|
| Back to top |
|
 |
|