• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

threading issues in rmi server

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic