HHH-7193 - Transaction Rollback not clearing statement batch on Prepared Statement causes issues with statement caching

This commit is contained in:
Steve Ebersole 2012-03-29 13:03:10 -05:00
parent b09e2729c0
commit fd9d168d19
1 changed files with 4 additions and 2 deletions

View File

@ -39,7 +39,7 @@ import org.hibernate.engine.jdbc.spi.SqlStatementLogger;
import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.CoreMessageLogger;
/** /**
* Convenience base class for implementors of the Batch interface. * Convenience base class for implementers of the Batch interface.
* *
* @author Steve Ebersole * @author Steve Ebersole
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
@ -203,7 +203,9 @@ public abstract class AbstractBatchImpl implements Batch {
@Override @Override
public void release() { public void release() {
if (getStatements() != null && !getStatements().isEmpty()) LOG.batchContainedStatementsOnRelease(); if ( getStatements() != null && !getStatements().isEmpty() ) {
LOG.batchContainedStatementsOnRelease();
}
releaseStatements(); releaseStatements();
observers.clear(); observers.clear();
} }