HHH-13433 EntityManager.find() should only check for roll-back-only condition if there is an active JTA transaction, otherwise ORM should throw throw convert( e, lockOptions )

This commit is contained in:
Scott Marlow 2019-06-11 09:40:36 -04:00 committed by gbadner
parent 25023486f1
commit 64eb4c56f7
1 changed files with 1 additions and 1 deletions

View File

@ -3531,7 +3531,7 @@ public final class SessionImpl
throw exceptionConverter.convert( new IllegalArgumentException( e.getMessage(), e ) );
}
catch ( JDBCException e ) {
if ( accessTransaction().getRollbackOnly() ) {
if ( accessTransaction().isActive() && accessTransaction().getRollbackOnly() ) {
// assume this is the similar to the WildFly / IronJacamar "feature" described under HHH-12472
return null;
}