mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-25 21:04:51 +00:00
HHH-13364 : Query.getSingleResult and getResultList() throw PessimisticLockException when pessimistic lock fails with timeout
(cherry picked from commit f62913ba1cd53f58930156858e9a459210584967)
This commit is contained in:
parent
b2707589b3
commit
e9fe3df6bd
@ -1511,7 +1511,7 @@ public List<R> list() {
|
|||||||
throw new IllegalArgumentException( e );
|
throw new IllegalArgumentException( e );
|
||||||
}
|
}
|
||||||
catch (HibernateException he) {
|
catch (HibernateException he) {
|
||||||
throw getExceptionConverter().convert( he );
|
throw getExceptionConverter().convert( he, getLockOptions() );
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
afterQuery();
|
afterQuery();
|
||||||
@ -1557,7 +1557,7 @@ public R getSingleResult() {
|
|||||||
return uniqueElement( list );
|
return uniqueElement( list );
|
||||||
}
|
}
|
||||||
catch ( HibernateException e ) {
|
catch ( HibernateException e ) {
|
||||||
throw getExceptionConverter().convert( e );
|
throw getExceptionConverter().convert( e, getLockOptions() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user