Change connection pool settings with the wsadmin tool

 

+

Search Tips   |   Advanced Search

 

Overview

Use the wsadmin tool to change connection pool settings.

The WAS wsadmin tool provides the ability to run scripts. The WAS only supports the Jacl and Jython scripting languages.

You must start the wsadmin scripting client before you perform any other task using scripting.

 

Connection Timeout

The Connection timeout can be changed at any time while the pool is active. All connection requests that are waiting for a connection are changed to the new value minus the time already waited, and are returned to the wait state if there are no available connections.

For example, if the connection timeout is changed to 300 seconds and a connection request has waited 100 seconds, the connection request waits for 200 more seconds if no connection becomes available.

$AdminControl getAttribute $objectname connectionTimeout
$AdminControl setAttribute $objectname connectionTimeout 200 

 

Maximum Connections

The maximum connections can be changed at any time except in the case where stuck connection support is active.

If stuck connection support is active, an attempt to change the maximum connections is made. If the attempt fails, an IllegalState exception occurs. See Connection pool advanced settings for more information.

If stuck connection support is not active, the maximum connections are changed to the new value. If the new value is greater than the current value, the number of connections increases to the new value and any requests waiting are notified. If the new value is less than the current value and Aged Timeout or Reap Time is used, the number of connections decreases to the new value depending on pool activity. If agedTimeout or Reap Time are not used, no automatic attempt will be made to reduce the total number of connections. To manually reduce the number of connections to the new maximum connections, use the Mbean function purgePoolContents.

$AdminControl getAttribute $objectname maxConnections
$AdminControl setAttribute $objectname maxConnections 200 

 

Minimum Connections

The minimum connections can be changed at any time

$AdminControl getAttribute $objectname minConnections
$AdminControl setAttribute $objectname minConnections 200 

 

Reap Time

The reap time can be changed at any time. The reap time interval is changed to the new value at the next interval.

$AdminControl getAttribute $objectname reapTime
$AdminControl setAttribute $objectname reapTime 30 

 

Unused Timeout

The unused timeout can be changed at any time.

$AdminControl getAttribute $objectname unusedTimeout
$AdminControl setAttribute $objectname unusedTimeout 900 

 

Aged Timeout

The Aged Timeout can be changed at any time.

$AdminControl getAttribute $objectname agedTimeout
$AdminControl setAttribute $objectname agedTimeout 900 

 

Purge Policy

The purge policy can be changed at any time.

$AdminControl getAttribute $objectname purgePolicy
$AdminControl setAttribute $objectname purgePolicy "Failing Connection Only" 

 

Surge Protection Support

Surge connection support starts if surgeThreshold is > -1 and surgeCreationInterval is > 0. The surge protection properties can be changed at any time.

$AdminControl getAttribute $objectname surgeCreationInterval
$AdminControl setAttribute $objectname surgeCreationInterval 30
$AdminControl getAttribute $objectname surgeThreshold
$AdminControl setAttribute $objectname surgeThreshold 15

 

Stuck connection Support

An attempt is made to change the stuckTime, stuckTimerTime or stuckThreshold properties. If the attempt fails, an IllegalState exception occurs. The pool cannot have any active requests or active connections during this request. For the stuck connection support to start, all three stuck property values must be greater than 0, and the maximum connections value must be > 0.

If the connection pool is stuck, one cannot change the stuck or the maximum connection properties. If you are stuck, there are active connections.

$AdminControl getAttribute $objectname stuckTime
$AdminControl setAttribute $objectname stuckTime 30
$AdminControl getAttribute $objectname stuckTimerTime
$AdminControl setAttribute $objectname stuckTimerTime 15
$AdminControl getAttribute $objectname stuckThreshold
$AdminControl setAttribute $objectname stuckThreshold 10 

 

Test Connection Support (This is only supported for a DataSource)

The test connection support starts when the testConnection property is set to true, and the interval is > 0. The test connection properties can be changed at any time.

$AdminControl getAttribute $objectname testConnection
$AdminControl setAttribute $objectname testConnection 30
$AdminControl getAttribute $objectname testConnectionInterval
$AdminControl setAttribute $objectname testConnectionInterval 15

 

Connection Pool Partition Support

$AdminControl invoke $objectname freePoolDistributionTableSize
$AdminControl invoke $objectname numberOfFreePoolPartitions
$AdminControl invoke $objectname numberOfSharedPoolPartitions
$AdminControl invoke $objectname gatherPoolStatisticalData
$AdminControl invoke $objectname enablePoolStatisticalData

 

Show Pool Information Support

The show pool operations can be changed at any time.

$AdminControl invoke $objectname showAllPoolContents
$AdminControl invoke $objectname showPoolContents
$AdminControl invoke $objectname showAllocationHandleList

 

Purge Connection Support

PurgePool can be changed at any time.

$AdminControl invoke $objectname purgePoolContents normal
$AdminControl invoke $objectname purgePoolContents immediate

 

Pool Control Support

Pause and resume can be changed at any time.

$AdminControl invoke $objectname pause
$AdminControl invoke $objectname resume


 

See Also


Connection pool settings
Connection pool advanced settings