IBM DB2 Manual page 223

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also suppose that clientRerouteAlternatePortNumber contains the
following string:
port1,port2,port3
When client affinities are enabled, the retry order is:
1. host1:port1
2. host2:port2
3. host3:port3
DB2BaseDataSource.NO (2)
The IBM Data Server Driver for JDBC and SQLJ does not enable client
affinities for cascaded failover support.
DB2BaseDataSource.NOT_SET (0)
The IBM Data Server Driver for JDBC and SQLJ does not enable client
affinities for cascaded failover support. This is the default.
The effect of the maxRetriesForClientReroute and retryIntervalForClientReroute
properties differs depending on whether enableClientAffinitiesList is enabled.
This property applies only to IBM Data Server Driver for JDBC and SQLJ type
4 connectivity.
enableSeamlessFailover
Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses
seamless failover for client reroute. The data type of this property is int.
Possible values are:
DB2BaseDataSource.YES (1)
The IBM Data Server Driver for JDBC and SQLJ uses seamless failover.
This means that the driver does not throw an SQLException with error
code -4498 after a failed connection has been successfully re-established
if the following conditions are true:
v The connection was not being used for a transaction at the time the
failure occurred.
v There are no outstanding global resources, such as global temporary
tables or open, held cursors, or connection states that prevent a
seamless failover to another server.
When seamless failover occurs, after the connection to a new data
source has been established, the driver re-issues the SQL statement that
was being processed when the original connection failed.
Recommendation: Set the queryCloseImplicit property to
DB2BaseDataSource.QUERY_CLOSE_IMPLICIT_NO (2) when you set
enableSeamlessFailover to DB2BaseDataSource.YES, if the application
uses held cursors.
DB2BaseDataSource.NO (2)
The IBM Data Server Driver for JDBC and SQLJ does not use seamless
failover.
When this setting is in effect, if a server goes down, the driver tries to
fail back or fail over to an alternate server. If failover or failback is
successful, the driver throws an SQLException with error code -4498,
which indicates that a connection failed but was successfully
reestablished. An SQLException with error code -4498 informs the
application that it should retry the transaction during which the
connection failure occurred. If the driver cannot reestablish a
connection, it throws an SQLException with error code -4499.
Chapter 7. JDBC and SQLJ reference information
207

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents