How can I better handle threading in RMI? How could I have a thread pool that RMI uses to service clients rather than create a new thread each time? Is this within the power of the developer, or does it need to be part of the underlying RMI implementation?

Edward Harned

Technically, you already have a pool of threads.  If your Server handles ten concurrent requests, then there are ten RMI Connection Threads processing these requests.   As each request finishes, the RMI Connection Threads waits for the next request "n" seconds.  If the next request comes in within this window, then a waiting RMI Connection Thread handles the request.  Otherwise, the RMI Run Time destroys the RMI Connection Thread and must create a new RMI Connection Thread for the next request.

As far as we know the wait time, ( "n" seconds), is part of the RMI implementation and is not alterable by developers.  During heavy usage the waiting pool should suffice.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact