Hi Robert,
Thank you for your reply. So you're saying that I should throw RecordNotFoundException in case this happenes? I don't have much choice though, because I'm stuck with the Interface contract. The sample code exists in the lockRecord method which is declared in the Interface as follows:
Another way of dealing with this is by reinterrupt the
thread. So the interrupt status can be learned by other code up the stack. This way I don't do nothing. It looks like this:
The downside to this, I think, is the code will continue executing after the reinterrupt so it might get dangerous in terms of thread-safety, like you described.
My thought is to throw the RecordNotFoundException and describe the choice in the choices.txt. Personally I don't like the solution, but sometimes we do things in life only to fulfill contracts..
If you have another suggestion, please let me know.
Regards,
Rob