Does RMI have a timeout period within which a remote invocation must return? Can I change this timeout period programatically for a specific remote method invocation?
Good question. We do not have "the" answer. This question has been here for several days so we submit the following:
The Java specification leaves implementation details to those who write the JVM. However, this is dependent on two factors:
- Release and implementation
We noticed a "time-out" in JDK1.1 on WindowsNT using the SUN implementation but not since SDK1.2. There was no "time-out" in JDK1.1 on WindowsNT using the IBM or Symantec implementations. There was no "time-out" in JDK1.1 on Linux (Blackdown) or other Unix type operating systems.
- Distributed Garbage Collection
"Garbage Collection of Remote Objects" is a chapter in itself. When and how the garbage collector frees references to remote objects and exactly what else it does is, once again, implementation dependent. You may also want to see the rmi server property: java.rmi.dgc.leaseValue(), (the default time-out for this is 10 minutes).