Search in sources :

Example 1 with ProxyConnection

use of org.apache.tomcat.jdbc.pool.ProxyConnection in project tomcat by apache.

the class ResetAbandonedTimer method resetTimer.

public boolean resetTimer() {
    boolean result = false;
    JdbcInterceptor interceptor = this.getNext();
    while (interceptor != null && result == false) {
        if (interceptor instanceof ProxyConnection) {
            PooledConnection con = ((ProxyConnection) interceptor).getConnection();
            if (con != null) {
                con.setTimestamp(System.currentTimeMillis());
                result = true;
            } else {
                break;
            }
        }
        interceptor = interceptor.getNext();
    }
    return result;
}
Also used : PooledConnection(org.apache.tomcat.jdbc.pool.PooledConnection) ProxyConnection(org.apache.tomcat.jdbc.pool.ProxyConnection) JdbcInterceptor(org.apache.tomcat.jdbc.pool.JdbcInterceptor)

Aggregations

JdbcInterceptor (org.apache.tomcat.jdbc.pool.JdbcInterceptor)1 PooledConnection (org.apache.tomcat.jdbc.pool.PooledConnection)1 ProxyConnection (org.apache.tomcat.jdbc.pool.ProxyConnection)1