@ -51,6 +51,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
private final PoolBagEntry bagEntry ;
private final FastList < Statement > openStatements ;
private long lastAccess ;
private boolean isCommitStateDirty ;
private boolean isConnectionStateDirty ;
private boolean isAutoCommitDirty ;
@ -76,6 +77,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
this . bagEntry = bagEntry ;
this . delegate = bagEntry . connection ;
this . leakTask = leakTask ;
this . lastAccess = bagEntry . lastAccess ;
this . openStatements = new FastList < Statement > ( Statement . class , 16 ) ;
}
@ -128,6 +130,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
public final void markCommitStateDirty ( )
{
isCommitStateDirty = true ;
lastAccess = System . currentTimeMillis ( ) ;
}
// ***********************************************************************
@ -136,6 +139,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
private final < T extends Statement > T trackStatement ( final T statement )
{
lastAccess = System . currentTimeMillis ( ) ;
openStatements . add ( statement ) ;
return statement ;
@ -202,6 +206,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
}
finally {
delegate = ClosedConnection . CLOSED_CONNECTION ;
bagEntry . lastAccess = lastAccess ;
parentPool . releaseConnection ( bagEntry ) ;
}
}