This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Custom cleanup thread vs unreferenced Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Custom cleanup thread vs unreferenced" Watch "Custom cleanup thread vs unreferenced" New topic

Custom cleanup thread vs unreferenced

Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I like to hear the +ve and -ve aspects of the two approaches below. I am basically looking at passing the exam.
1) Develop a custom thread to wake up every few seconds (read from the properties file) and clean up the unreferenced locks on the records
2) Implement the Unreferenced interface in the remote implementation to clean up the unreferenced locks.
It is the choice between programmer defined cleanp up time vs default 15 minutes.
Rajesh Matti
Ranch Hand

Joined: Jan 07, 2002
Posts: 121
Sai - I would do both as implementing #2 is not at all expensive where as #1 is a must for any database server, I feel.
However, 1st choice of yours covers choice#2 too.
I agree. Here's the link:
subject: Custom cleanup thread vs unreferenced
Similar Threads
RMI vs. Sockets
culling dead locks
client crash
Using Unreferenced vs a daemon thread