code: @Override
  	final public void run() {
  		while(true) {
  			try {
  				try {
  					sleep(delayTime);
  				} catch(InterruptedException err) {
  					logger.log(Level.WARNING, null, err);
  				}
  				long time = System.currentTimeMillis();
  				List<C> connsToClose;
  				synchronized(poolLock) {
  					if(isClosed) return;
  					// Find any connections that are available and been idle too long
  					int maxIdle = maxIdleTime;
  					connsToClose = new ArrayList<>(availableConnections.size());
  					for(PooledConnection<C> availableConnection : availableConnections) {
  						synchronized(availableConnection) {
  							C conn = availableConnection.connection;
  							if(conn!=null) {
  								if(
  									(time-availableConnection.releaseTime) > maxIdle // Idle too long
  									|| (
  										maxConnectionAge!=UNLIMITED_MAX_CONNECTION_AGE
  										&& (
  											availableConnection.createTime > time // System time reset?
  											|| (time-availableConnection.createTime) >= maxConnectionAge // Max connection age reached
  										)
  									)
  								) {
  									availableConnection.connection = null;
  									connsToClose.add(conn);
  								}
  							}
  						}
  					}
  				}
  				// Close all of the connections
  				for(C conn : connsToClose) {
  					try {
  						close(conn);
  					} catch(Exception err) {
  						logger.log(Level.WARNING, null, err);
  					}
  				}
  			} catch (ThreadDeath TD) {
  				throw TD;
  			} catch (Throwable T) {
  				logger.logp(Level.SEVERE, AOPool.class.getName(), "run", null, T);
  			}
  		}
  	}
docs: The RefreshConnection thread polls every connection in the connection pool. If it
  detects a connection is idle for more than the pre-defined MAX_IDLE_TIME, it closes
  the connection.  It will stop when the pool is flagged as closed.