in src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java [115:135]
public void activateObject(final PooledObject<PoolableConnection> p) throws SQLException {
validateLifetime(p);
final PoolableConnection poolableConnection = p.getObject();
poolableConnection.activate();
if (defaultAutoCommit != null && poolableConnection.getAutoCommit() != defaultAutoCommit) {
poolableConnection.setAutoCommit(defaultAutoCommit);
}
if (defaultTransactionIsolation != UNKNOWN_TRANSACTION_ISOLATION && poolableConnection.getTransactionIsolation() != defaultTransactionIsolation) {
poolableConnection.setTransactionIsolation(defaultTransactionIsolation);
}
if (defaultReadOnly != null && poolableConnection.isReadOnly() != defaultReadOnly) {
poolableConnection.setReadOnly(defaultReadOnly);
}
if (defaultCatalog != null && !defaultCatalog.equals(poolableConnection.getCatalog())) {
poolableConnection.setCatalog(defaultCatalog);
}
if (defaultSchema != null && !defaultSchema.equals(Jdbc41Bridge.getSchema(poolableConnection))) {
Jdbc41Bridge.setSchema(poolableConnection, defaultSchema);
}
poolableConnection.setDefaultQueryTimeout(defaultQueryTimeoutDuration);
}