In the administrative console, click Resources > JDBC > Data sources > data_source.
Click WebSphere Application Server data source properties.
In the DB2 automatic client reroute options section, fill in the fields to enable client rerouting. Complete the following fields:
Alternate server names
Specifies the list of alternate server name or names for the DB2 server. If more than one alternate server name is specified, the names must be separated by commas. For example:
host1,host2
Alternate port numbers
Specifies the list of alternate server port or ports for the DB2 server. If more than one alternate server port is specified, the ports must be separated by commas. For example:
5000,50001
Avoid trouble: Ensure that an equal number of entries must be specified for both alternate ports and hosts. Otherwise, a warning is displayed and client reroute is not enabled.
Optional: Enable client reroute with the persistence option.
Complete the field for Client reroute server list JNDI name. The field specifies the JNDI name that is used to bind the DB2 client reroute server list into the JNDI name space. The DB2 database server uses this name to look up the alternate server name list when the alternate server information is not already in memory.
Avoid trouble: Be aware of the following:
This option is not supported for Type 2 data sources. If you use a DB2 data source that is configured as a Type 2 JDBC driver, the JDBC driver uses a catalog to persist the client reroute information. If this property is configured with a Type 2 driver, the application server will issue a warning.
Use different JNDI names among different data sources. Otherwise, when you delete a data source, and the JNDI entry is removed from the name space, the other data sources that share the JNDI entry will be affected.
Configure the retry count and interval for the client reroute function. Complete these two fields:
Retry interval for client reroute
Specifies the amount of time, in seconds, between retries for automatic client reroute.
Maximum retries for client reroute
Specifies the maximum number of connection retries that are attempted by the automatic client reroute function if the primary connection to the server fails. The property is only used when Retry interval for client reroute is set.
Attention: If you do not specify a value for these properties, DB2 failover processing (client rerouting) does not occur.