transactionIsolation = null;
readOnly = null;
catalog = null;
return;
}
PoolConfiguration poolProperties = parent.getPoolProperties();
if (poolProperties.getDefaultTransactionIsolation()!=DataSourceFactory.UNKNOWN_TRANSACTIONISOLATION) {
try {
if (transactionIsolation==null || transactionIsolation.intValue()!=poolProperties.getDefaultTransactionIsolation()) {
con.getConnection().setTransactionIsolation(poolProperties.getDefaultTransactionIsolation());
transactionIsolation = Integer.valueOf(poolProperties.getDefaultTransactionIsolation());
}
}catch (SQLException x) {
transactionIsolation = null;
log.error("Unable to reset transaction isolation state to connection.",x);
}
}
if (poolProperties.getDefaultReadOnly()!=null) {
try {
if (readOnly==null || readOnly.booleanValue()!=poolProperties.getDefaultReadOnly().booleanValue()) {
con.getConnection().setReadOnly(poolProperties.getDefaultReadOnly().booleanValue());
readOnly = poolProperties.getDefaultReadOnly();
}
}catch (SQLException x) {
readOnly = null;
log.error("Unable to reset readonly state to connection.",x);
}
}
if (poolProperties.getDefaultAutoCommit()!=null) {
try {
if (autoCommit==null || autoCommit.booleanValue()!=poolProperties.getDefaultAutoCommit().booleanValue()) {
con.getConnection().setAutoCommit(poolProperties.getDefaultAutoCommit().booleanValue());
autoCommit = poolProperties.getDefaultAutoCommit();
}
}catch (SQLException x) {
autoCommit = null;
log.error("Unable to reset autocommit state to connection.",x);
}
}
if (poolProperties.getDefaultCatalog()!=null) {
try {
if (catalog==null || (!catalog.equals(poolProperties.getDefaultCatalog()))) {
con.getConnection().setCatalog(poolProperties.getDefaultCatalog());
catalog = poolProperties.getDefaultCatalog();
}
}catch (SQLException x) {
catalog = null;
log.error("Unable to reset default catalog state to connection.",x);
}