How can I control the lease period associated with a client's reference for my remote object?
However, the lease term can be easily changed, and is controlled by the system property java.rmi.dgc.leaseValue.
java -Djava.rmi.dgc.leaseValue=300000 MyRemoteImpl
resets the lease term to 5 minutes. The lease period is indicated in milliseconds.
Note that for optimal performance, the lease term should not be set toa very small value. An active RMI client automatically renews the lease when it is halfway expired, and a very small lease term would cause the client to consume precious network resources in repeatedly renewing the lease.