|
|
|
@ -147,8 +147,9 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
|
|
|
|
|
return statement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private final void closeOpenStatements()
|
|
|
|
|
private final boolean closeOpenStatements()
|
|
|
|
|
{
|
|
|
|
|
boolean success = true;
|
|
|
|
|
final int size = openStatements.size();
|
|
|
|
|
if (size > 0) {
|
|
|
|
|
for (int i = 0; i < size; i++) {
|
|
|
|
@ -160,11 +161,13 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
|
|
|
|
|
}
|
|
|
|
|
catch (SQLException e) {
|
|
|
|
|
checkException(e);
|
|
|
|
|
success = success ? !poolEntry.evicted : false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openStatements.clear();
|
|
|
|
|
}
|
|
|
|
|
return success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// **********************************************************************
|
|
|
|
@ -179,8 +182,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
|
|
|
|
|
leakTask.cancel();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
closeOpenStatements();
|
|
|
|
|
|
|
|
|
|
if (closeOpenStatements()) {
|
|
|
|
|
if (isCommitStateDirty) {
|
|
|
|
|
lastAccess = clockSource.currentTime();
|
|
|
|
|
|
|
|
|
@ -197,6 +199,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
|
|
|
|
|
|
|
|
|
|
delegate.clearWarnings();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (SQLException e) {
|
|
|
|
|
// when connections are aborted, exceptions are often thrown that should not reach the application
|
|
|
|
|
if (!poolEntry.aborted) {
|
|
|
|
|