Java DataBase Connectivity connection pools

JDBC connection pools are established to allow multithreaded applications to request resources from a backend database without having to incur the connect and disconnect overhead on every database request.

Using larger Java™ DataBase Connectivity connection pools has the advantage of holding previously-used connections active in the pool, so that applications and application threads can share (or pool) their backend database connections. Subsequent requests by different threads can use an existing connection and avoid the overhead of new connection creation and teardown, as well as the overhead of being queued.

Increasing the size of the connection pool increases the memory requirements on WebSphere® and DB2®. Therefore, the connection pool requirements must be balanced against available server memory. Users from Web-based applications often issue short-lived transactions, where reducing connect and disconnect times can provide greatly improved response times.

Figure 1 displays the values for the Java DataBase Connectivity connection pools. These are the selected settings:
  • A minimum and maximum connection pool value of 100.
  • A Connection timeout value of zero, which means that when there are no available connections (all 100 are in use), the connection request waits for an indefinite amount of time.
  • A Reap time value of zero, which disables the pool maintenance thread so that the other time-outs related to pool maintenance become irrelevant.
  • All other values set to zero.
Figure 1. Setting JDBC connection pools
The JDCB general properties page