The following is adapted from Bob Perillo's original class which was used for Urlybird. Anyone utilisng this class will probably have to make some
adjustments, especially in the FindingRecordsThread() method. One area where your code may differ is that I did my unlocking in a finally block
and I also used a cache map to cut down on I/O. The loop can be increased to whatever you like and exceptions will be thrown dependant upon
input. The program should complete fairly quickly and if it sits there hanging this probably indicates deadlock.
And i guess your SecurityException is a checked exception... But how could this code compile in your test-case? Or maybe i'm missing something here but i would expect a try/catch around the call to unlock in the finally block
I was just wondering why your deadlock testing class compiles, but if your SecurityException extends RuntimeException (like you said), then that's the reason why. I thought that your SecurityException was a checked exception (like i did myself in my code, but with the RecordNotFoundException), so i was a bit amazed that your code did compile.