Ibm Data Server Driver For Jdbc And Sqlj Client Reroute Operation - IBM DB2 Manual

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
IBM Data Server Driver for JDBC and SQLJ client reroute
operation
90
Application Programming Guide and Reference for Java
getXXX and setXXX methods are defined for each property.
When a DataSource is configured to use JNDI for storing client reroute alternate
information, the standard server and port properties of the DataSource are not
used for a getConnection request. Instead, the primary server address is obtained
from the transient clientRerouteServerList information. If the JNDI store is not
available due to a JNDI bind or lookup failure, the IBM Data Server Driver for
JDBC and SQLJ attempts to make a connection using the standard server and port
properties of the DataSource. Warnings are accumulated to indicate that a JNDI
bind or lookup failure occurred.
After a failover:
v The IBM Data Server Driver for JDBC and SQLJ attempts to propagate the
updated server information to the JNDI store.
v primaryServerName and primaryPortNumber values that are specified in
DB2ClientRerouteServerList are used for the connection. If primaryServerName
is not specified, the serverName value for the DataSource instance is used.
When IBM Data Server Driver for JDBC and SQLJ client reroute support is
enabled, a Java application that is connected to a DB2 for z/OS or DB2 Database
for Linux, UNIX, and Windows server can continue to run when the primary
server has a failure.
Client reroute for a Java application that is connected to a DB2 server operates in
the following way when support for client affinities for cascaded failover is
disabled:
1. During each connection to the data source, the IBM Data Server Driver for
JDBC and SQLJ obtains primary and alternate server information.
v For the first connection to a DB2 for z/OS or DB2 Database for Linux, UNIX,
and Windows server:
a. If the clientRerouteAlternateServerName and
clientRerouteAlternatePortNumber properties are set, the IBM Data
Server Driver for JDBC and SQLJ loads those values into memory as the
alternate server values, along with the primary server values serverName
and portNumber.
b. If the clientRerouteAlternateServerName and
clientRerouteAlternatePortNumber properties are not set, and a JNDI
store is configured by setting the property
clientRerouteServerListJNDIName on the DB2BaseDataSource, the IBM
Data Server Driver for JDBC and SQLJ loads the primary and alternate
server information from the JNDI store into memory.
c. If no DataSource properties are set for the alternate servers, and JNDI is
not configured, the IBM Data Server Driver for JDBC and SQLJ checks
DNS tables for primary and alternate server information. If DNS
information exists, the IBM Data Server Driver for JDBC and SQLJ loads
those values into memory.
d. If no primary or alternate server information is available, a connection
cannot be established, and the IBM Data Server Driver for JDBC and
SQLJ throws an exception.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents