Configuration
Element | Type | Default | Description |
---|---|---|---|
timeout | int | 0 (= connections never closed) | The time in ms after which a connection in the pool should be considered for closing and purging from the pool. NOTE: the connection will not actually be closed until the next purge, so still could be reused if a request for a connection is received before the next purge occurs. |
purgeThreshold | int | 0 (= infinite connections) | The minimum number of available connections in the pool before a purge will take place. It is not guaranteed that the pool will ever have this many connections available, but the pool will not be purged unless it does. |
purgePoll | int | 60000 (= 60s) | The period in ms between purges of the connection pool. |
Example Configuration
<component name="RDBConnection" subType="default" factoryName="aspire-multiple-rdb"> <purgePoll>300000</purgePoll> <purgeThreshold>10</purgeThreshold> <timeout>3600000</timeout> </component>
Obtaining RDB Connections from Components
This component can provide other components with RDB connections. It achieves this by implementing the MultiRDBMSConnectionPool.java and MultiRDBMSConnection.java interfaces. When a connection to an RDB is required, the developer should use the MultiRDBMSConnectionPool interface, passing the appropriate connection parameters to obtain a MultiRDBMSConnection. This can then be used to get information about the pool associated with this connection, return the connection to the pool or to access the java.sql.connection to the database.
Components wishing to access this functionality should main a service tracker to this component, get an instance an then call the appropraite method. See here for further details.
Overview
Content Tools