setLoginTimeout(int seconds)

Syntax:

void setLoginTimeout(int seconds)
                     throws SQLException

Description:

Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created, the login timeout is initially zero.

Parameters:

seconds

the data source login time limit

Throws:

SQLException - if a database access error occurs

Reference:

For more information, reference JDBC documentation for: CommonDataSource.setLoginTimeout(int)