JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.1 (H06.23+, J06.12+)

connections and connections in use. When the maximum number of physical connections is reached, the
Type 4 driver
throws an
SQLException and sends the message,
Maximum pool size is reached.
Set this property on a DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set
properties, see
How to Specify JDBC Type 4 Properties.
Data type: int
Units: number of physical connections
Default: -1 (Disables connection pooling.)
Range: -1, 0 through 2147483647, but greater than
minPoolSize
The value determines connection-pool use as follows:
Any negative value is treated like -1.
0 means no maximum pool size.
A value of -1 disables connection pooling.
Any positive value less than
minPoolSize is changed to the minPoolSize value.
maxStatements Property
The maxStatements property sets the total number of PreparedStatement objects that the connection pool should cache. This total includes both
free objects and objects in use. The
Type 4 driver Side Cache uses Most Frequently Used (MFU) algorithm. When the number of
PreparedStatements in the cache exceeds the specified maxStatements property, the least used
PreparedStatement is closed and removed
from the statement cache to make way for a new statement.
Set this property on a
DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set
properties, see
How to Specify JDBC Type 4 Properties.
Data type: int
Units: number of objects
Default: 0 (Disables statement pooling.)
Range: 0 through 2147483647
The value 0 disables statement pooling. Any negative value is treated like 0 (zero).
Performance tip: HP recommends that you enable statement pooling for your JDBC applications because this pooling can dramatically help
the performance of many applications.
For example, to specify statement pooling, type:
maxStatements=10
The Prepared Statement Caching algorithm is updatedfor each SQL prepared statement, a number is assigned starting with one. The
assigned number increments by one whenever the statement is prepared again. This technique helps in selecting the prepared statements to be
removed from the
NonStop JDBC Type 4 Driver 3.1 cache. The prepared statements, which are not in use but are in cache, are selected and
sorted based on the number assigned previously. The prepared statement, whose number is the least, is removed from the cache.
minPoolSize Property
The minPoolSize property limits the number of physical connections that can be in the free connection pool.
Set this property on a
DataSource object, ConnectionPoolDataSource object, or DriverManager object. For information about how to set
properties, see
How to Specify JDBC Type 4 Properties.
Data type: int
Default: -1 (The
minPoolSize value is ignored.)
Range: -1, 0 through n, but less than
maxPoolSize
Any negative value is treated like -1. Any value greater than maxPoolSize is changed to the maxPoolSize value. The value of minPoolSize is set
to -1 when
maxPoolSize is -1. The value determines connection pool use as follows:
When the number of physical connections in the free pool reaches the minPoolSize value, the Type 4 driver closes subsequent connections
by physically closing them—and not adding them to the free pool.
0 (zero) means that the connections are not physically closed; the connections are always added to the free pool when the connection is
closed.
For example, use the following specification to set the
minPoolSize value to 1, which ensures that one connection is always retained:
minPoolSize=1