To configure a IBM® Data Server Driver for JDBC and SQLJ client application that connects to a DB2® for Linux, UNIX, and Windows DB2 pureScale® instance for workload balancing, you need to connect to a member of the DB2 pureScale instance, and set the properties that enable workload balancing and the maximum number of connections.
Java™ client applications support transaction-level workload balancing. They do not support connection-level workload balancing. Workload balancing is supported only for connections to a DB2 pureScale instance.
Workload balancing support for Java client applications that connect to DB2 for Linux, UNIX, and Windows works for connections that are obtained using the javax.sql.DataSource, javax.sql.ConnectionPoolDataSource, javax.sql.XADataSource, or java.sql.DriverManager interface.
The following table describes the basic property settings for enabling DB2 for Linux, UNIX, and Windows workload balancing for Java applications.
IBM Data Server Driver for JDBC and SQLJ setting | Value |
---|---|
enableSysplexWLB property | true |
maxTransportObjects property | The maximum number of connections that the requester can make to the DB2 pureScale instance |
Connection address: server | The IP address of a member of a DB2 pureScale instance1 |
Connection address: port | The SQL port number for the DB2 pureScale instance1 |
Connection address: database | The database name |
Note:
|
If you want to fine-tune DB2 for Linux, UNIX, and Windows workload balancing support, global configuration properties are available. The properties for the IBM Data Server Driver for JDBC and SQLJ are listed in the following table.
IBM Data Server Driver for JDBC and SQLJ configuration property | Description |
---|---|
db2.jcc.maxRefreshInterval | Specifies the maximum amount of time in seconds between refreshes of the client copy of the server list that is used for workload balancing. The default is 10. The minimum valid value is 1. |
db2.jcc.maxTransportObjectIdleTime | Specifies the maximum elapsed time in number of seconds before an idle transport is dropped. The default is 10. The minimum supported value is 0. |
db2.jcc.maxTransportObjectWaitTime | Specifies the number of seconds that the client will wait for a transport to become available. The default is 1. The minimum supported value is 0. |
db2.jcc.minTransportObjects | Specifies the lower limit for the number of transport objects in a global transport object pool. The default value is 0. Any value that is less than or equal to 0 means that the global transport object pool can become empty. |