Attributes

The following table describes attributes for the jdbc-connection-pool element.

Table 1–61 jdbc-connection-pool
Attributes

Attribute

Default

Description

name

none

Specifies the name of the connection pool. A jdbc-resource element’s pool-name attribute refers to
this name.

datasource-classname

none

Specifies the class name of the associated vendor-supplied data source.
This class must implement java.sql.DataSource, java.sql.XADataSource , javax.sql.ConnectionPoolDatasource,
or a combination.

res-type

javax.sql. DataSource

(optional) Specifies the interface the data source class implements.
The value of this attribute can be javax.sql.DataSource, javax.sql.XADataSource , or javax.sql.ConnectionPoolDatasource. If the value is not one of these interfaces, the default is used.
An error occurs if this attribute has a legal value and the indicated interface
is not implemented by the data source class.

steady-pool-size

8

(optional) Specifies the initial and minimum number of connections maintained
in the pool.

max-pool-size

32

(optional) Specifies the maximum number of connections that can be created
to satisfy client requests.

max-wait-time-in-millis

60000

(optional) Specifies the amount of time, in milliseconds, that the caller
is willing to wait for a connection. If 0, the caller is
blocked indefinitely until a resource is available or an error occurs.

pool-resize-quantity

2

(optional) Specifies the number of connections to be created or destroyed
to maintain the steady-pool-size.

When the pool has no free connections, this number of connections is
created, subject to the max-pool-size limit.

Connections are destroyed periodically at the idle-time-out-in-seconds interval. An idle connection is one that has not been used for
a period of idle-time-out-in-seconds. All the invalid and
idle connections are removed, sometimes resulting in removing a number of
connections greater than this value.

idle-timeout-in-seconds

300

(optional) Specifies the maximum time that a connection can remain idle
in the pool. After this amount of time, the pool can close this connection.

Applications that change the isolation level on a pooled connection
programmatically risk polluting the pool, which can lead to errors. See is-isolation-level-guaranteed
for more details.

is-isolation-level-guaranteed

true

(optional) Applicable only when transaction-isolation-level is explicitly set. If true, every connection
obtained from the pool is guaranteed to have the desired isolation level.
This might impact performance on some JDBC drivers. Only set this attribute
to false if you are certain that the hosted applications
do not return connections with altered isolation levels.

is-connection-validation-required

false

(optional) Specifies whether connections have to be validated before
being given to the application. If a resource’s validation fails, it
is destroyed, and a new resource is created and returned.