Thank you both for your responses.
Andrew, can you give me your advise as to what is a "reasonable"
test of my locking strategy. For example, can you (or anyone else here) advise of a "fool-proof" way to ensure that my code is thread-safe?
I have performed the following tests:
1. Issued up to 100 concurrent lock requests for the same record using separate remote connections, with debug statements on each successful lock, each wait, and each unlock showing the current Thread and requesting object ID. This shows that it was never possible to obtain a lock on a locked record.
2. Issued up to 100 concurrent lock requests for the same record using 1 remote connection, with debug showing that a request for a lock on a locked record by the requesting objectID returns with no action.
Assuming I do not have any other Java programmers around me to review my code, what other tests / advice can you offer? Any advice is much appreciated.
Thanks,