• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unreferenced question

 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic