Hello ranchers, I think everyone using RMI should have meet the problem.But I searched and did not found any related thread.
We know that a live client reference has a lease with a specified time. If a client does not refresh the connection to the remote object before the lease term expires, the reference is considered to be dead and the remote object may be garbage collected. The lease time is controlled by the system property java.rmi.dgc.leaseValue. The value is in milliseconds and defaults to 10 minutes.
Because of these garbage collection semantics, a client must be prepared to deal with remote objects that have "disappeared."
My question is: How does a client know that the remote object has "disappeared"?