Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I control the lease period associated with a clients reference for my remote object?

0
Posted

How can I control the lease period associated with a clients reference for my remote object?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123