HHH-10807 - Moved isActive from Transaction to TransactionImplementor.

This commit is contained in:
Chris Cranford 2016-06-15 13:06:01 -05:00
parent 1bc2f7c79c
commit ee4f939a04
3 changed files with 12 additions and 15 deletions

View File

@ -38,16 +38,6 @@ public interface Transaction extends EntityTransaction {
*/
TransactionStatus getStatus();
/**
* Indicate whether a resource transaction is in progress.
*
* @param isMarkedRollbackConsideredActive whether to consider {@link TransactionStatus#MARKED_ROLLBACK} as active.
*
* @return boolean indicating whether transaction is in progress
* @throws HibernateException if an unexpected error condition is encountered.
*/
boolean isActive(boolean isMarkedRollbackConsideredActive);
/**
* Register a user synchronization callback for this transaction.
*

View File

@ -6,7 +6,9 @@
*/
package org.hibernate.engine.transaction.spi;
import org.hibernate.HibernateException;
import org.hibernate.Transaction;
import org.hibernate.resource.transaction.spi.TransactionStatus;
/**
* @author Steve Ebersole
@ -28,4 +30,14 @@ public interface TransactionImplementor extends Transaction {
default void invalidate() {
// no-op : see @deprecated note
}
/**
* Indicate whether a resource transaction is in progress.
*
* @param isMarkedRollbackConsideredActive whether to consider {@link TransactionStatus#MARKED_ROLLBACK} as active.
*
* @return boolean indicating whether transaction is in progress
* @throws HibernateException if an unexpected error condition is encountered.
*/
boolean isActive(boolean isMarkedRollbackConsideredActive);
}

View File

@ -191,11 +191,6 @@ public class BatchModeTransactionCoordinator implements TransactionCoordinator {
return false;
}
@Override
public boolean isActive(boolean isMarkedRollbackConsideredActive) {
return false;
}
@Override
public TransactionStatus getStatus() {
return transactionDriver.getStatus();