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 6dc5f37827
commit a682a7d19c
1 changed files with 1 additions and 1 deletions

View File

@ -3347,7 +3347,7 @@ public final class SessionImpl
throw getExceptionConverter().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;
}