Previous Topic: ODBC DriverNext Topic: JDBC Server


JDBC Driver

A JDBC application can set the reply timeout for specific Connection or Statement object using the methods specified by the JDBC API.

The application can use the DriverManager.setLoginTimeout method to set the reply timeout for JDBC Connections established using the DriverManager.

The application can use the DataSource.setLoginTimeout method to set the reply timeout for all connections established using a specific DataSource. Application servers may provide administrative tools to maintain these properties.

The IdmsConnectOptions LoginTimeout or WaitTimeOut properties can be set to define the default system login timeout.

A JDBC application can also use the Statement.setQueryTimeout method to set the reply timeout for all SQL requests made using a specific Statement object. The IdmsConnectOptions QueryTimeout or WaitTimeOut properties can be set to define the default system query timeout.

For the JDBC type 2 driver, setting a reply timeout to a non-zero value using any of these methods overrides the reply wait timeout set for CAICCI/PC on Windows and sets the timeout for CAICCI/ENF on z/OS. For the JDBC type 3 and type 4 drivers, the reply timeout is used as the socket timeout. In this case, a value of zero means that the reply timeout is disabled and the driver waits forever.

Note: For more information, see the chapter "JDBC Programmer Reference."