wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Handling Client Crash Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Handling Client Crash" Watch "Handling Client Crash" New topic
Author

Handling Client Crash

Ramesh kumaar
Ranch Hand

Joined: Mar 19, 2002
Posts: 146
Hello All,
In order to handle the client crash i implement Unreferenced Interface and override the unreferenced() method. Inside that i try to simply print a statement saying "Unreferenced Method called successfully" which is never called.
While starting the server iam using the following:
java -Djava.rmi.dgc.leaseValue=30000 which will reduce the leaseValue.
The unreferenced method never get called even after 30 minutes. Is there any thing to be done appart from this. Help me.
regards,
rameshkumar
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I don't think "-Djava.rmi.dgc.leaseValue" is one of the valid server side configuration parameters as per the requirement document. If you don't specifiy this param, unreferenced() will be called in 15 mins.
Ramesh kumaar
Ranch Hand

Joined: Mar 19, 2002
Posts: 146
Hello Sai,
Ur right i just use -Djava.rmi.dgc.leaseValue=30000 just for testing purpose iam not going to do that for the Exam. I have planned to use System.setPropertie(). But the problem is in my program unreferenced() is never called even after 30 minutes. Please help me
to over come this problem.
regards,
-rameshkumar
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Ramesh, I am not sure. In my case the method was called in 15 mins after I kill the client. Did you shut down the client? Also try with out setting the leasevalue property.
BJ Grau
Ranch Hand

Joined: Jul 10, 2001
Posts: 234
After you set leaseValue, also set sun.rmi.dgc.checkInterval to one half of lease value.
Maybe in your situation leaseValue is expiring in 30 seconds, but since it takes 5 minutes for the checkInterval to come around, something is happening to the remote object on the server during that five minutes that precludes it from having unreferenced() called.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling Client Crash