HHH-5982 : Flush checker bugs
This commit is contained in:
parent
4d5b9f1ca1
commit
747c2dd50d
|
@ -139,7 +139,8 @@ public class SynchronizationCallbackCoordinatorImpl implements SynchronizationCa
|
||||||
private static final ManagedFlushChecker STANDARD_MANAGED_FLUSH_CHECKER = new ManagedFlushChecker() {
|
private static final ManagedFlushChecker STANDARD_MANAGED_FLUSH_CHECKER = new ManagedFlushChecker() {
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldDoManagedFlush(TransactionCoordinator coordinator, int jtaStatus) {
|
public boolean shouldDoManagedFlush(TransactionCoordinator coordinator, int jtaStatus) {
|
||||||
return coordinator.getTransactionContext().isFlushModeNever() &&
|
return ! coordinator.getTransactionContext().isClosed() &&
|
||||||
|
! coordinator.getTransactionContext().isFlushModeNever() &&
|
||||||
coordinator.getTransactionContext().isFlushBeforeCompletionEnabled() &&
|
coordinator.getTransactionContext().isFlushBeforeCompletionEnabled() &&
|
||||||
! JtaStatusHelper.isRollback( jtaStatus );
|
! JtaStatusHelper.isRollback( jtaStatus );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1253,7 +1253,8 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
|
||||||
private static class ManagedFlushCheckerImpl implements ManagedFlushChecker {
|
private static class ManagedFlushCheckerImpl implements ManagedFlushChecker {
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldDoManagedFlush(TransactionCoordinator coordinator, int jtaStatus) {
|
public boolean shouldDoManagedFlush(TransactionCoordinator coordinator, int jtaStatus) {
|
||||||
return ! coordinator.getTransactionContext().isFlushModeNever() &&
|
return ! coordinator.getTransactionContext().isClosed() &&
|
||||||
|
! coordinator.getTransactionContext().isFlushModeNever() &&
|
||||||
! JtaStatusHelper.isRollback( jtaStatus );
|
! JtaStatusHelper.isRollback( jtaStatus );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue