How can I control the lease period associated with a clients reference for my remote object?
Location: http://www.jguru.com/faq/view.jsp?EID=1001 Created: Nov 14, 1999 Author: Govind Seshadri (http://www.jguru.com/guru/viewbio.jsp?EID=14) When a RMI client obtains a reference for the remote object, by default, the reference is live for 10 minutes. If there is no client activity before the lease term expires, the reference is considered to be invalid, and the remote object may be subject to garbage collection, presuming there are no other clients holding a live reference to it. However, the lease term can be easily changed, and is controlled by the system property java.rmi.dgc.leaseValue. For example: 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
Related Questions
- My TAO server publishes an object reference to my JacORB client, but the "narrow" call is failing on the client. What should I do?
- How does a client deactivate a server object immediately after a remote call to the object has been executed successfully?
- How do I reference a service object from a remote partition?