mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-14 23:25:00 +00:00
HHH-8459 - Improved handling of JPA schema-generation target files
This commit is contained in:
parent
0bf29bc2fd
commit
d0b556ece6
@ -682,6 +682,8 @@ public Connection obtainConnection() throws SQLException {
|
||||
|
||||
@Override
|
||||
public void releaseConnection(Connection connection) throws SQLException {
|
||||
// NOTE : reset auto-commit, but *do not* close the Connection. The application handed us this connection
|
||||
|
||||
if ( ! wasInitiallyAutoCommit ) {
|
||||
try {
|
||||
if ( jdbcConnection.getAutoCommit() ) {
|
||||
@ -763,6 +765,7 @@ public void releaseConnection(Connection connection) throws SQLException {
|
||||
);
|
||||
}
|
||||
|
||||
// Reset auto-commit
|
||||
if ( ! wasInitiallyAutoCommit ) {
|
||||
try {
|
||||
if ( jdbcConnection.getAutoCommit() ) {
|
||||
@ -773,6 +776,9 @@ public void releaseConnection(Connection connection) throws SQLException {
|
||||
log.info( "Was unable to reset JDBC connection to no longer be in auto-commit mode" );
|
||||
}
|
||||
}
|
||||
|
||||
// Release the connection
|
||||
connectionProvider.closeConnection( jdbcConnection );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user