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
public void beforeCompletion(TransactionImplementor transaction) {
if ( isOpen() ) {
if ( flushBeforeCompletionEnabled ){
SessionImpl.this.managedFlush();
}
getActionQueue().beforeTransactionCompletion();
}
else {
if (actionQueue.hasAfterTransactionActions()){
LOG.log( Logger.Level.DEBUG, "Session had after transaction actions that were not processed");
}
if ( isOpen() && flushBeforeCompletionEnabled ) {
SessionImpl.this.managedFlush();
}
beforeTransactionCompletion( transaction );
}
@Override