Change the beforeCompletion() method of the TransactionObserver() to call the beforeTransactionCompletion() method regardless of whether or not the session is open like the afterCompletion() method does when calling the afterTransactionCompletion() and also cleaned up the log message around session having after transaction events as this sort of logging had been previously moved to the close() method of SessionImpl.
This commit is contained in:
Shawn Clowater 2012-05-08 15:54:05 -06:00 committed by Steve Ebersole
parent 4fe75d5a09
commit 6ac746fffc
1 changed files with 3 additions and 10 deletions

View File

@ -285,17 +285,10 @@ public final class SessionImpl extends AbstractSessionImpl implements EventSourc
@Override @Override
public void beforeCompletion(TransactionImplementor transaction) { public void beforeCompletion(TransactionImplementor transaction) {
if ( isOpen() ) { if ( isOpen() && flushBeforeCompletionEnabled ) {
if ( flushBeforeCompletionEnabled ){
SessionImpl.this.managedFlush(); SessionImpl.this.managedFlush();
} }
getActionQueue().beforeTransactionCompletion(); beforeTransactionCompletion( transaction );
}
else {
if (actionQueue.hasAfterTransactionActions()){
LOG.log( Logger.Level.DEBUG, "Session had after transaction actions that were not processed");
}
}
} }
@Override @Override