Looking through the sources of org.hibernate.jdbc.ConnectionManager, I noticed a bug in releaseBorrowedConnection (line 169)
The method reads:
Code:
public void releaseBorrowedConnection() {
if ( borrowedConnection != null ) {
borrowedConnection = null;
BorrowedConnectionProxy.renderUnuseable( borrowedConnection );
}
}
whereas it should read:
Code:
public void releaseBorrowedConnection() {
if ( borrowedConnection != null ) {
BorrowedConnectionProxy.renderUnuseable( borrowedConnection );
borrowedConnection = null;
}
}