File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Thread Usage in Remote Method Invocations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Thread Usage in Remote Method Invocations" Watch "Thread Usage in Remote Method Invocations" New topic
Author

Thread Usage in Remote Method Invocations

Hung Sam
Greenhorn

Joined: Aug 23, 2004
Posts: 6
Hi everybody,
This forum has been very useful. I have been able to solve many problems by reading other people's posts.
And I am having another question regarding to RMI and Thread. Any help would be very much appreciated.

The RMI Specifications say:
"A method dispatched by the RMI runtime to a remote object implementation may or may not execute in a separate thread. The RMI runtime makes no guarantees with respect to mapping remote object invocations to threads."

my question is
Should i assume that concurrent requests from clients are handled by RMI (which, accoring to some articles, is not scalable)?

OR

Should i implement a RMI server that places all requests from clients to a queue, then have a group of Threads that process these requests and send the results back to the clients.

Any suggestions from Java Experts out there

msam
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

I don't think you need to go to that level of complexity, just simple calls to RMI, and don't assume that the next call will occur in the same thread.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Thread Usage in Remote Method Invocations