code: private void setQueryTimeout(final Statement statement, final int timeoutSec)
     {
        if (isQueryTimeoutSupported != FALSE) {
           try {
              statement.setQueryTimeout(timeoutSec);
              isQueryTimeoutSupported = TRUE;
           }
           catch (Exception e) {
              if (isQueryTimeoutSupported == UNINITIALIZED) {
                 isQueryTimeoutSupported = FALSE;
                 logger.info("{} - Failed to set query timeout for statement. ({})", poolName, e.getMessage());
              }
           }
        }
     }
docs: Set the query timeout, if it is supported by the driver.
  
  @param statement a statement to set the query timeout on
  @param timeoutSec the number of seconds before timeout