Here is the code I used to test my DB Locking. Give it a look-see. If you use it, please let me know! Most important, let me know if you find it
SCJP 1.4 (91%)<br />SCJD 1.4 (376/400, 94%)
posted 12 years ago
Looks good except you may want to have a few more Threads concurrently attempting to lock / unlock records. It wasn't until I had 10,000 Threads fired off that I noticed that some of them were never returning from the wait state!