Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: delete()

 
joe black
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to delete a record you need to have the correct lock cookie, so let's say you lock a record, delete it, then when you try to unlock that record number you get a RecordNotFoundException. So how would you go about removing the lock? In the unlock, do you check to see if the record doesn't exist AFTER removing from the Map, so if you create a record in the deleted record's place, then lock it, you can get a lock on it?
lock() -> delete() -> unlock() which throws RecordNotFoundException
[ December 12, 2003: Message edited by: Joe Black ]
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,
Check out this thread.
 
joe black
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ken. I just found that thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic