Forums Register Login

threading issues in rmi server

+Pie Number of slices to send: Send
Hello guys,
I have a question about threading issues @ the server side in RMI
How does the jvm handle requests at the server side? I mean does it use a separate thread for every client? Can i ask it to use a thread pool?
Without correct threading model at the serverside, (if it uses a new thread per request and kills it after the request is done), we would have lots of scalability issues. I know this is not a major concern for the exam, but just a thought !!!
Dushy
+Pie Number of slices to send: Send
I know that the RMI spec avoids making any commitment to how or if threads are used - the goal apparently is to allow implementations the freedom to optimize as they see fit. So in general, no you can't controll this in any standard way. It's quite possible that some Java implementations allow you to control this though; I dunno. I believe that some sort of thread pooling is the default in the current J2SDK 1.4.2, as I've used Thread.currentThread() to identify thread IDs, and have observed that there's certainly more than one thread used, but threads can and do get reused on differerent clients. I don't know any other details how or if this can be controlled however. If you don't get a good answer to that from someone else, you may wish to ask the question in the "Distributed Java" forum. Then let us know what you find out. Hope that helps...
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 554 times.
Similar Threads
Threaded Server
Load handling of RMI requests!!!
Threads 003: Server-Side Strategies
Threading in containers
RMI Sever Supports Multi Threading ??
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:38:28.