Is there any limit on the time duration of an RMI call? Does RMI support timeouts?

Edward Harned

We know of no time limit for an RMI Call. However, consider the following:

When timing a request, the RMI Connection thread cannot time itself. If it gets caught in a long or never ending loop then it may not be able to break out of the code when the time expires. Therefore, it is necessary for the RMI Connection thread to start a new application thread. The RMI Connection thread may time the new thread and if the time expires the RMI Connection thread informs the calling client that the request cannot complete.

This seems simple enough. However, there are serious problems with this approach.

For every request there is a new application thread. The VM must create and destroy every thread. This overhead puts a severe strain on resources. There may come a time when the VM cannot sustain any more threads and the entire VM becomes unusable.

[Some developers may put the timing code in the client. Rather than have a standard timing mechanism on the server, each client application must add proprietary timing code.]

What happens to the threads that time-out? If there is problem with a resource that the threads require before completing, then, once again, there may come a time when the VM cannot sustain any more threads and the entire VM becomes unusable.

[Even with the timing code in the client, the RMI Connection threads still hang.] We have a commercial product that solves this problem.

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

 

 

 

 

 


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

 

 

About | Sitemap | Contact