diff --git a/hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionCoordinatorImpl.java b/hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionCoordinatorImpl.java index 946ce317a2..fd2e442d25 100644 --- a/hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionCoordinatorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/resource/transaction/backend/jta/internal/JtaTransactionCoordinatorImpl.java @@ -462,7 +462,9 @@ public class JtaTransactionCoordinatorImpl implements TransactionCoordinator, Sy @Override public void markRollbackOnly() { - jtaTransactionAdapter.markRollbackOnly(); + if ( jtaTransactionAdapter.getStatus() != TransactionStatus.NOT_ACTIVE ) { + jtaTransactionAdapter.markRollbackOnly(); + } } }