HHH-13364 : Query.getSingleResult and getResultList() throw PessimisticLockException when pessimistic lock fails with timeout

This commit is contained in:
Gail Badner 2019-04-11 19:38:04 -07:00 committed by gbadner
parent 288afa35e0
commit f62913ba1c
1 changed files with 2 additions and 2 deletions

View File

@ -1535,7 +1535,7 @@ public abstract class AbstractProducedQuery<R> implements QueryImplementor<R> {
throw new IllegalArgumentException( e );
}
catch (HibernateException he) {
throw getExceptionConverter().convert( he );
throw getExceptionConverter().convert( he, getLockOptions() );
}
finally {
afterQuery();
@ -1581,7 +1581,7 @@ public abstract class AbstractProducedQuery<R> implements QueryImplementor<R> {
return uniqueElement( list );
}
catch ( HibernateException e ) {
throw getExceptionConverter().convert( e );
throw getExceptionConverter().convert( e, getLockOptions() );
}
}