Yes, you can throw an IllegalStateException when a record is trying to lock the same record. In my solution i simply throw an IllegalStateException if a thread/client is trying to lock a record if it has already locked a record (even if he's trying to lock the same record).
I used also my own interface (extending Sun's interface) and added some methods + changed some method declarations (but it were still legal overrides) and I passed the SCJD exam (so did a whole lot of other ranchers), so I don't think it is a problem if you do it too.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com