isValid = pingInterval < getConfiguration().getPingInterval();
isValid = true; if (getConfiguration().getPingInterval() > 0) isValid &= pingInterval < getConfiguration().getPingInterval();
    protected synchronized PooledObject getPooledConnection(        PooledConnectionQueue queue) throws SQLException     {        PooledObject result;        result = queue.take();        if (result instanceof XPingableConnection) {                        boolean isValid = false;                        while (!isValid) {                XPingableConnection pingableConnection = (XPingableConnection)result;                    long lastPingTime = pingableConnection.getLastPingTime();                long pingInterval = System.currentTimeMillis() - lastPingTime;                                isValid = pingInterval < getConfiguration().getPingInterval();                                if (!isValid && !pingableConnection.ping()) {                    if (getLogger() != null)                        getLogger().warn(                            "Connection " + result                            + " was not valid, trying to get another one.");                                                // notify queue that invalid connection was destroyed                    queue.destroyConnection(result);                    // take another one                    result = (PooledObject)queue.take();                }            }        }        // save the queue to which this connection belongs to        connectionToQueueMap.put(result, queue);                return result;    }