my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes deadlock Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "deadlock " Watch "deadlock " New topic
Author

deadlock

Maksym Odintsov
Greenhorn

Joined: Jan 22, 2009
Posts: 11
Hi. In order to avoid a deadlock in my program a user must call lock then update or delete and then unlock methods. User can't lock a record before he unlocks the previous. But what if the clients machine will crash for some reasons. what if for example the user will call lock then update and then he will crash. If this happen my program will deadlock. So do I nead to solve this problem at all ? And if I do please tell how can I do it.
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2266
    
    3

I mentioned this in my choices.txt file (that this could happen), but the chances of this happening are so remote that I did not bother about it.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: deadlock