| It occurred on find() for me personally (that's how I actually found this ticket). Is it possibly happening for any EntityManager method that allows locking? Also, it's specifically LockAcquisitionException, not LockTimeoutException, that's being thrown as a PersistenceException. The stack trace in the ticket body is roughly the same thing I'm seeing. I'm trying to catch all lock related exceptions, but when a LockAcquisitionException is thrown I have to interrogate a PersistenceException to handle it:
try {
} catch (PessimisticLockException | LockTimeoutException e) {
} catch (PersistenceException e) {
if (e.getCause() instanceof LockAcquisitionException) {
} else {
throw e;
}
}
|