Connection Manager (connectionManager)
Connection Manager configuration
Name | Type | Default | Description |
---|---|---|---|
agedTimeout |
A period of time with second precision |
-1 |
Amount of time before a connection can be discarded by pool maintenance. A value of -1 disables this timeout. A value of 0 discards every connection, which disables connection pooling. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds. |
connectionTimeout |
A period of time with second precision |
30s |
Amount of time after which a connection request times out. A value of -1 disables this timeout, meaning infinite wait. A value of 0 is immediate, meaning no wait. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds. |
id |
string |
A unique configuration ID. |
|
maxIdleTime |
A period of time with second precision |
30m |
Amount of time a connection can be unused or idle until it can be discarded during pool maintenance, if doing so does not reduce the pool below the minimum size. A value of -1 disables this timeout. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds. |
maxPoolSize |
int |
50 |
Maximum number of physical connections for a pool. A value of 0 means unlimited. The optimal setting depends on the application characteristics. For an application in which every thread obtains a connection to the database, you might start with a 1:1 mapping to the `coreThreads` attribute. |
minPoolSize |
int |
Minimum number of physical connections to maintain in the pool. The pool is not pre-populated. Aged timeout can override the minimum. |
|
purgePolicy |
|
EntirePool |
Specifies which connections to destroy when a stale connection is detected in a pool. This setting can provide a major improvement on large multi-core (8+) machines by reserving the specified number of database connections for each thread. |
reapTime |
A period of time with second precision |
3m |
Amount of time between runs of the pool maintenance thread. A value of -1 disables pool maintenance. Specify a positive integer followed by a unit of time, which can be hours (h), minutes (m), or seconds (s). For example, specify 30 seconds as 30s. You can include multiple values in a single entry. For example, 1m30s is equivalent to 90 seconds. |
Advanced Properties |
|||
autoCloseConnections |
boolean |
true |
Attempts to clean up after applications that leave connections open after the end of a servlet request, enterprise bean instance, managed executor task, contextual task, or managed completion stage. When an unsharable connection is obtained within one of these application artifacts and remains open when it ends, the container attempts to close the connection handle. The container may also close sharable connections that do not support DissociatableManagedConnection. Applications should always follow the programming model defined by the specification and close connections at the appropriate times rather than relying on the container, even when this option is enabled. |
enableContainerAuthForDirectLookups |
boolean |
false |
If set to true, connections use container authentication. If set to false, connections use application authentication. |
enableSharingForDirectLookups |
boolean |
true |
If set to true, connections are shared. If set to false, connections are unshared. |
maxConnectionsPerThread |
int |
Limits the number of open connections on each thread. |
|
numConnectionsPerThreadLocal |
int |
Caches the specified number of connections for each thread. |