|
|
|
@ -55,19 +55,19 @@ public abstract class ProxyConnection implements Connection
|
|
|
|
|
|
|
|
|
|
protected Connection delegate;
|
|
|
|
|
|
|
|
|
|
private final ProxyLeakTask leakTask;
|
|
|
|
|
private final PoolEntry poolEntry;
|
|
|
|
|
private final ProxyLeakTask leakTask;
|
|
|
|
|
private final FastList<Statement> openStatements;
|
|
|
|
|
|
|
|
|
|
private int dirtyBits;
|
|
|
|
|
private long lastAccess;
|
|
|
|
|
private boolean isCommitStateDirty;
|
|
|
|
|
|
|
|
|
|
protected boolean isAutoCommit;
|
|
|
|
|
private boolean isReadOnly;
|
|
|
|
|
private boolean isAutoCommit;
|
|
|
|
|
private int networkTimeout;
|
|
|
|
|
private int transactionIsolation;
|
|
|
|
|
private String dbcatalog;
|
|
|
|
|
private boolean isReadOnly;
|
|
|
|
|
|
|
|
|
|
// static initializer
|
|
|
|
|
static {
|
|
|
|
@ -83,12 +83,13 @@ public abstract class ProxyConnection implements Connection
|
|
|
|
|
SQL_ERRORS.add("JZ0C1"); // Sybase disconnect error
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected ProxyConnection(final PoolEntry poolEntry, final Connection connection, final FastList<Statement> openStatements, final ProxyLeakTask leakTask, final long now, final boolean isAutoCommit) {
|
|
|
|
|
protected ProxyConnection(final PoolEntry poolEntry, final Connection connection, final FastList<Statement> openStatements, final ProxyLeakTask leakTask, final long now, final boolean isReadOnly, final boolean isAutoCommit) {
|
|
|
|
|
this.poolEntry = poolEntry;
|
|
|
|
|
this.delegate = connection;
|
|
|
|
|
this.openStatements = openStatements;
|
|
|
|
|
this.leakTask = leakTask;
|
|
|
|
|
this.lastAccess = now;
|
|
|
|
|
this.isReadOnly = isReadOnly;
|
|
|
|
|
this.isAutoCommit = isAutoCommit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -227,7 +228,7 @@ public abstract class ProxyConnection implements Connection
|
|
|
|
|
leakTask.cancel();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if (isCommitStateDirty && !isAutoCommit) {
|
|
|
|
|
if (isCommitStateDirty && !isAutoCommit && !isReadOnly) {
|
|
|
|
|
delegate.rollback();
|
|
|
|
|
lastAccess = clockSource.currentTime();
|
|
|
|
|
LOGGER.debug("{} - Executed rollback on connection {} due to dirty commit state on close().", poolEntry.getPoolName(), delegate);
|
|
|
|
|