File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Unreferenced Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Unreferenced" Watch "Unreferenced" New topic


BJ Grau
Ranch Hand

Joined: Jul 10, 2001
Posts: 234
Folks -
Does anybody have any input on how to handle a client that has crashed? I am using the Unreferenced interface to detect when a client is done with a remote object, but Unreferenced doens't help me much if a client does not finish with a remote object gracefully. If a client crashes I have to wait for the lease time to expire before Unreferenced.unreferenced() gets called on my object. I don't want to lower the lease time because to make it useful for cleaning up after a crashed client would require me to lower it to the point that my client VMs would be renewing leases far too frequently.
Should I even be worrying about crashed clients?
-BJ Grau
Bryan Clauser

Joined: Mar 05, 2002
Posts: 29
Depends on how robust you want to make you system. Remember that the specs say nothing about having to deal with a client crash. I stuck to the specs, and just documented that I did not implement anything for the client crashing, because of the small amount of time that there would be for a client to crash while actually having a record locked will be less than a second, so I felt at this stage of the program client crashes did not need to be taken into account.
[ May 24, 2002: Message edited by: Bryan Clauser ]

Bryan<p>SCJP, SCJD, SCWCD</p>
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

No, you don't need to worry about it. I only used Unreferenced, and had it wait for the entire lease time, that is absolutely fine.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Unreferenced
It's not a secret anymore!