I am trying to extend Unreferenced in my Server code to get notified when all the clients go away. I would like to get this on my ConnectionImpl which handles all the details for a single client connection. I read in JGURU that unreferenced() will not get called if the Server is registered with the RMI registry. I register the ConnectionFactoryimpl with the registry, not the ConnectionImpl. When I tried to implement unreferenced() on connectionImpl, it did not get called when the corresponding client went away.
Did anyone get this to work successfully? Help
java.rmi.dgc.leaseValue (1.1 and later)
The value of this property represents the lease duration (in milliseconds) granted to other JVMs that hold remote references to objects which have been exported by this JVM. Clients usually renew a lease when it is 50% expired, so a very short value will increase network traffic and risk late renewals in exchange for reduced latency in calls to Unreferenced.unreferenced. The default value of this property is 600000 milliseconds (10 minutes).
This is what SUN write about the 'java.rmi.dgc.leaseValue' property
[ January 06, 2003: Message edited by: Peter den Haan ]