Hi,
I have few things I would like to confirm with you that are ok:
1)My specification for update and delete mentions: "Throws SecurityException if the record is locked with a cookie other than lockCookie". So I decided to let update and delete perform the operations if the record is not locked at all, without locking it, despite the horror scenario when two such operations would perform concurently, or even the scenario in which after a not synchronize update peration, checks if the record is not loc and after that another synchronyzed operation is interfering and locking it, they would still both perform the operation. I have mentioned it in choices.txt and in Javadoc of the methods. I am not sure about this... Should I also throw Security Exception if a record is not locked at all?
2)I used sockets implementation and in my DbRequest i did:
[edit]do not post complete chunks of actual code
for lock releasing whne client disconnects, is that OK?
3) I also keep a lockCookie field in the DbClient and i do this:
[edit]do not post complete chunks of actual code
If this RuntimeException is thrown, the GUI is not doing anything but the record to be locked in second place is simply not being updated, as i considered that a client trying to lock two records record at a time is just an error in implementation of the programmer that calls lock method, as I mentioned in the Javadoc and also in choices.txt. Still I am not sure if this behavior is fine.
[edit]do not post complete chunks of actual code
I didn't synchronized them as for the purpose of my application, is not needed.
I did this to prevent deadlock cause because of such a situation. Is it OK?
4) I wanted the lock()/unlock() methods to only be called by the client. because delete method from sun did not specify it also releases the lock on some record. But that lock still needs to be released after a deletation, as other threads might have already be blocked while pending for it. So I made unlock not verify if the record exists if it was locked and the lock cookie is valid, looks like this:
[edit]do not post complete chunks of actual code
I would really need some opinion about all these

, thank you.