This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unreferenced question

 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just read Daniela's "leasevalue' thread. I guess I didn't wait fot 15 min. for it to be called!
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rene
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's good to give a hungry man a fish, but it's even better to give him a fishing hook You can find this in your JDK documentation: go to the Guide to Features heading, select Remote Method Invocation (RMI), then under the For More Information heading you'll find Useful java.rmi Properties.
- Peter
[ January 06, 2003: Message edited by: Peter den Haan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic