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 ( ) ) ; } } } }
Set the query timeout if it is supported by the driver .