Previous Topic: Timeouts for Your SystemNext Topic: JDBC Driver with the JDBC Proxy Method


DriverManager Method

A JDBC application can use the DriverManager.setLoginTimeout method to set the server servername timeout for JDBC connections established using the DriverManager. A java.util.Properties object including the applid, serverName, and systemId properties must be provided to get the connection.

The DataSource.setLoginTimeout method can also be used to set the server servername timeout for all connections established using a specific DataSource. The DatacomDataSource object must include the serverName, systemId and ApplicationID properties. These properties are exposed by the Datacom DataSource.setServerName, Datacom DataSource.setSystemidName, and Datacom DataSource.setApplidName methods. Application servers typically use reflection to discover the properties of a DataSource implementation class and provide administrative tools to maintain them.

The JDBC driver treats the timeout as if it were specified using the DRIVER keyword with ODBC. On Windows, the DRIVER keyword overrides the default CAICCI-PC Timeout. This sets the default value used with CAICCI/ENF on z/OS and UNIX.

The Statement.setQueryTimeout method can be used by a JDBC application to set the Timeout for all SQL requests made using a specific Statement object. This overrides the default timeout no matter how it was set.