IBM DB2 Manual page 346

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
|
|
|
| |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
330
Application Programming Guide and Reference for Java
This method does not apply to connections to IBM Informix Dynamic Server
data sources.
isDB2Alive
Format:
public boolean DB2Connection.isDB2Alive()
throws java.sql.SQLException
Returns true if the socket for a connection to the data source is still active.
Important: isDB2Alive is deprecated in the JDBC 4.0 implementation of the
IBM Data Server Driver for JDBC and SQLJ. Use Connection.isValid instead.
isDBValid
Format:
public boolean DB2Connection.isDBValid(boolean throwException, int timeout)
throws java.sql.SQLException
Returns true if the connection has not been closed and is still valid. Returns
false otherwise.
Parameter descriptions:
throwException
Specifies whether isDBValid throws an SQLException if the connection is
not valid. Possible values are:
true
isDBValid throws an SQLException if the connection is not valid.
false
isDBValid throws an SQLException only if the value of timeout is
less than 0.
timeout
The time in seconds to wait for a database operation that the driver
submits to complete. The driver submits that database operation to the
data source to validate the connection. If the timeout period expires before
the database operation completes, isDBValid returns false. A value of 0
indicates that there is no timeout period for the database operation.
This method does not apply to connections to IBM Informix Dynamic Server
data sources.
reconfigureDB2Connection
Format:
public void reconfigureDB2Connection(java.util.Properties properties)
throws SQLException
Reconfigures a connection with new settings. The connection does not need to
be returned to a connection pool before it is reconfigured. This method can be
called while a transaction is in progress, and can be used for trusted or
untrusted connections.
Trusted connections are supported for:
IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to DB2
v
Database for Linux, UNIX, and Windows Version 9.5 or later, and DB2 for
z/OS Version 9.1 or later
IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for
v
z/OS Version 9.1 or later
Parameter descriptions:

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents