The <dbcp-connection-pool> database configuration
element
The <database> element in file database-config.xml contains, at most, a single occurrence of subelement <dbcp-connection-pool>. The use of the <dbcp-connection-pool> element is optional. If using PolicyCenter to manage the connection pool rather than a JNDI data source managed by the application server, you must use this element to configure the connection pool behavior.
If you experience slow performance, it is possible that the PolicyCenter server is not allocating enough database connections. If all database connections are in use, any client attempting to connect to the server must wait until a connection is free. By default, PolicyCenter periodically tests connections in the connection pool using a simple query and evicts idle connections and those that fail with an exception.
The <dbcp-connection-pool> element has the following syntax. The following code sample shows required attributes in bold font.
<database>
<!-- Sets options for the connection pool that Guidewire provides -->
<dbcp-connection-pool jdbc-url="string" max-idle="integer" max-total="integer" max-wait="integer"
min-evictable-idle-time="integer" num-tests-per-eviction-run="integer" password-file="string"
test-on-borrow="true|false" test-on-return="true|false" test-while-idle="true|false"
time-between-eviction-runs="integer" when-exhausted-action="block|fail|grow">
<reset-tools-params collation="string" oracle-tnsnames="string" system-password="string"
system-username="string"/>
</dbcp-connection-pool>
</database>
The following list describes the attributes that you can configure on the <dbcp-connection-pool> element.
|
Required. Stores connection information for the database. The format of the |
The following attributes are all optional. |
|
|
Maximum number of connections that can sit idle in the pool at any time. If negative, there is no limit to the number of connections that can be idle at any given time. The default is -1. |
|
Maximum number of connections that the connection pool can allocate, including those in use by a client or that are in an idle state awaiting use. A reasonable initial value for this is about 25% of the number of users that you expect to use PolicyCenter at the same time. If you increase the number of workers for a work queue for a batch process, then you also need to increase the possible number of database connections by setting max-total to a larger number. If you set If you configure If the number of database connections reaches the value of |
|
Maximum amount of time, in milliseconds, that the data source waits for a connection before one becomes available in the pool to service. The default is 30000. Guidewire recommends that you do not set the value of this attribute to a negative number (infinite wait time). If it is not possible to deliver a connection in a reasonable amount of time, you want the connection request to time out and to issue an error. The value of the |
|
Maximum time, in milliseconds, that a connection can sit idle in the pool before it is eligible for eviction due to idle time. If a connection is idle more the specified number of milliseconds, PolicyCenter evicts the connection from the pool. The default is 300000 milliseconds. If this value is a non-positive integer, PolicyCenter does not drop connections from the
pool due to idle time alone. This setting has no effect unless the value of
During an eviction run, PolicyCenter scans the connection pool and tests the number of
idle connections equal to the value of |
|
Number of idle connections that PolicyCenter tests in each eviction run. This setting
has no effect unless the value of |
|
Use to hide the value of the database connection password in the |
|
Boolean. Whether PolicyCenter tests a connection by running a simple validation query
as PolicyCenter first borrows the connection from the connection pool. If set to PolicyCenter returns any connection used only for a query to the pool immediately after the query completes. Thus, running a test query every time that a connection returns to the pool can potentially affect performance. |
|
Boolean. Whether PolicyCenter tests a connection by running a simple validation query
as PolicyCenter returns the connection to the connection pool. If set to PolicyCenter returns any connection used only for a query to the pool immediately after the query completes. Thus, running a test query every time that a connection returns to the pool can potentially affect performance. |
|
Boolean. Whether PolicyCenter performs validation on idle connections in the
connection pool. If set to This attribute value has no effect unless the value of |
|
Time, in milliseconds, that PolicyCenter waits between eviction runs of idle connections in the connection pool. The default is 60000. If set to a a non-positive integer, PolicyCenter does not launch any eviction threads. |
|
Specifies the behavior of the connection pool if the pool has no more connections. Set this attribute to one of the following values:
The default is |
The <dbcp-connection-pool> element has the following subelement.
|
See The <reset-tool-params> database configuration element for more information. |
See also
