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 NX: delete() 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 "NX: delete()" Watch "NX: delete()" New topic

NX: delete()

joe black
Ranch Hand

Joined: Dec 03, 2003
Posts: 103
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

Joined: Nov 27, 2002
Posts: 451
Check out this thread.

kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
joe black
Ranch Hand

Joined: Dec 03, 2003
Posts: 103
Thanks Ken. I just found that thread.
I agree. Here's the link:
subject: NX: delete()
It's not a secret anymore!