The interface org.hibernate.tool.schema.extract.spi.ExtractionContext has a default implementation of the getQueryResults method that appears to have a JDBC Connection leak:
try (PreparedStatement statement = getJdbcConnection().prepareStatement( queryString )) {
......
}
Note that the Statement is managed by the try block, but the getJdbcConnection is not. I spotted this by running tests that use the Schema extraction stuff, and I eventually ran out of connections due to this. |