HHH-10715 Unreleased statement in IdTableHelper

This commit is contained in:
Sanne Grinovero 2020-10-10 21:50:59 +01:00
parent 8dda0616f5
commit c44f1f96bf
1 changed files with 12 additions and 12 deletions

View File

@ -122,21 +122,21 @@ public class IdTableHelper {
try {
// TODO: session.getTransactionCoordinator().getJdbcCoordinator().getStatementPreparer().createStatement();
Statement statement = connection.createStatement();
try ( java.sql.Statement statement = connection.createStatement() ) {
for ( String dropStatement : dropStatements ) {
try {
jdbcServices.getSqlStatementLogger().logStatement( dropStatement );
statement.execute( dropStatement );
}
catch (SQLException e) {
log.debugf( "Error attempting to cleanup id-table : [%s]", e.getMessage() );
for ( String dropStatement : dropStatements ) {
try {
jdbcServices.getSqlStatementLogger().logStatement( dropStatement );
statement.execute( dropStatement );
}
catch (java.sql.SQLException e) {
log.debugf( "Error attempting to cleanup id-table : [%s]", e.getMessage() );
}
}
// TODO
// session.getTransactionCoordinator().getJdbcCoordinator().release( statement );
}
// TODO
// session.getTransactionCoordinator().getJdbcCoordinator().release( statement );
statement.close();
}
catch (SQLException e) {
log.error( "Unable to use JDBC Connection to create Statement", e );