in src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java [156:178]
public void close() throws SQLException {
assertOpen();
closed = true;
try {
if (stmtPool != null) {
try {
stmtPool.close();
} finally {
stmtPool = null;
}
}
} catch (final RuntimeException e) {
throw e;
} catch (final Exception e) {
throw new SQLException("Cannot close connection (return to pool failed)", e);
} finally {
try {
connection.close();
} finally {
connection = null;
}
}
}