Originally posted by JP Estrada:
But is there a way in java to trap a database lock?
I don't know of a way to do that. This doesn't mean it is impossible of course, just not common.
If the lock times out will it throw an exception?
Yes. You will get a SQLException for any type of database problem.