• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Releasing un released record locks

 
parthiban subramaniam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
i have seen many post here regarding how to release them .. some prefer unrefrenced and some others do in a different way..
my understanding is
records which are to be locked are not to be locked forever .. they are potential records needed by other clients .. why cant we have a lease period for a lock and once a lease period is expired release them no matter what .. and let the lock manager do that task itself .. after all he is the one who is taking care of the locks ...
this can be done easily using a timer task ..
and that's how i have done it .. i dun care who locked them .. if they lock lease period is expired .. it has to go(unlocked)
any opinions ??
cheers,
parthi
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

.. some prefer unrefrenced and some others do in a different way..

... and some do not do anything at all, which I think is the best approach. There is nothing in the requirements about releasing stale locks, and in fact, you can read the Sun's javadoc comment "no timeouts are defined" as "don't bother with Unreferenced or any other lock cleaning facilities".
Eugene.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic