HHH-13695 DDL export forgets to close a Statement
This commit is contained in:
parent
e5539cc36c
commit
b4a8052a15
|
@ -86,6 +86,15 @@ public class GenerationTargetToDatabase implements GenerationTarget {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void release() {
|
public void release() {
|
||||||
|
if ( jdbcStatement != null ) {
|
||||||
|
try {
|
||||||
|
jdbcStatement.close();
|
||||||
|
jdbcStatement = null;
|
||||||
|
}
|
||||||
|
catch (SQLException e) {
|
||||||
|
throw ddlTransactionIsolator.getJdbcContext().getSqlExceptionHelper().convert( e, "Unable to close JDBC Statement after DDL execution" );
|
||||||
|
}
|
||||||
|
}
|
||||||
if ( releaseAfterUse ) {
|
if ( releaseAfterUse ) {
|
||||||
ddlTransactionIsolator.release();
|
ddlTransactionIsolator.release();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue