In a Java™ SE environment,
you can change the parameters of the connection pool in the ra.xml deployment
descriptor, for example to fine-tune performance.
About this task
In Java SE configurations,
the execution unit (XU) uses the defaultConnectionManagerProperties property
as part of its own implementation of the Java ConnectionManager interface.
Procedure
- Add a ra.xml file anywhere on the
class path. You can find a template in the product installation directory: <InstallDir>/executionserver/bin/ra.xml
<InstallDir> is the product installation
directory.
- Find the defaultConnectionManagerProperties property.
<config-property>
<config-property-name>defaultConnectionManagerProperties</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>pool.maxSize=20,pool.waitTimeout=-1</config-property-value>
</config-property>
- Replace the default value
pool.maxSize=20 with
one or all of the following properties:
- Optional: Enable the connection maintenance task:
connection.maintenancePeriod=<period>
connection.idleTimeout=<maxIdle>
For the best performance, the connection pool keeps unused connections free, so it can reuse them
quickly. If a ruleset changes frequently or numerous different rulesets are run, keeping an unused
connection might retain unrequired memory. The pool maintenance task provides a way to free an
unused connection early. You control the pool maintenance task with the following properties:
connection.maintenancePeriod: The interval in seconds between runs of the
maintenance task. Unset by default, the maintenance task does not run. When the pool maintenance
task runs, it discards any connections remaining unused for longer than the time value specified in
connection.idleTimeout property.
connection.idleTimeout: Specifies the interval in seconds after which an idle
connection is discarded. Set the idle timeout value, <maxIdle>, to a value that
is larger than the maintenancePeriod value for optimal performance. By default, the
value is not set.
- Save the deployment descriptor.