private void setLoginTimeout ( final DataSource dataSource ) { if ( connectionTimeout != Integer . MAX_VALUE ) { try { dataSource . setLoginTimeout ( Math . max ( 1 , ( int ) MILLISECONDS . toSeconds ( 500L + connectionTimeout ) ) ) ; } catch ( Exception e ) { logger . info ( "{} - Failed to set login timeout for data source. ({})" , poolName , e . getMessage ( ) ) ; } } }
Set the loginTimeout on the specified DataSource .