IBM DB2 Manual page 109

Table of Contents

Advertisement

|
|
|
|
| | |
| |
| |
| |
| |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Examples
Example: Client reroute to a DB2 server when maxRetriesForClientReroute and
retryIntervalForClientReroute are not set: Suppose that the following properties are set
for a connection to a database:
Property
enableClientAffinitiesList
serverName
portNumber
clientRerouteAlternateServerName
clientRerouteAlternatePortNumber
The following steps demonstrate a client reroute scenario for a connection to a DB2
for z/OS or DB2 Database for Linux, UNIX, and Windows server:
1. The IBM Data Server Driver for JDBC and SQLJ loads host1:port1 into its
memory as the primary server address, and host2:port2 into its memory as the
alternate server address.
2. On the initial connection, the driver tries to connect to host1:port1.
3. The connection to host1:port1 fails, so the driver tries another connection to
host1:port1.
4. The reconnection to host1:port1 fails, so the driver tries to connect to
host2:port2.
5. The connection to host2:port2 succeeds.
6. The driver retrieves alternate server information that was received from server
host2:port2, and updates its memory with that information.
Assume that the driver receives a server list that contains host2a:port2a,
host2:port2. host2a:port2a is stored as the new primary server, and host2:port2
is stored as the new alternative server. If another communication failure is
detected on this same connection, or on another connection that is created
from the same DataSource, the driver tries to connect to host2a:port2a as the
new primary server. If that connection fails, the driver tries to connect to the
new alternate server host2:port2.
7. A communication failure occurs during the connection to host2:port2.
8. The driver tries to connect to host2a:port2a.
9. The connection to host2a:port2a is successful.
10. The driver retrieves alternate server information that was received from server
host2a:port2a, and updates its memory with that information.
The following steps demonstrate a client reroute scenario for a connection to IBM
Informix Dynamic Server:
1. The IBM Data Server Driver for JDBC and SQLJ tries to connect to the
Connection Manager that is identified by host1:port1.
2. The connection to host1:port1 fails, so the driver tries to connect to the
Connection Manager that is identified by host2:port2.
3. The connection to host2:port2 succeeds.
4. The driver retrieves alternate server information that was received from server
host2:port2, and updates its memory with that information.
Assume that the driver receives a server list that contains host1a:port1a,
host2a:port2a. host1a:port1a is stored as the new primary server, and
Value
DB2BaseDataSource.NO (2)
host1
port1
host2
port2
Chapter 3. JDBC application programming
93

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents