• 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

How to use Unreferenced in RMI?

 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers,
My motivation comes from a problem in designing server-clients.If my client suddenly shut down while connecting server, my server need to get some information from such client.Should i use Unreferenced interface or some other classes?And how to use?
 
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unreferenced is only called when no client has a reference to the server. If you use the RMIRegistry, then it has a reference and Unreferenced is never called.

Your concern has been the concern of developers since the beginning of remote procedures. There have been numerous discussions on this subject on the RMI forum at java.sun.com. It all comes down to personal preferences.

My personal preference is: So What! I�m a Server. I�m here to service requests from remote clients. Because no clients call me for n-minutes, So What. If this is a big concern, then look into Activation. You can deactivate your server in times of no activity and reestablish it when next a client calls.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic