113 lines
7.3 KiB
HTML
113 lines
7.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="ConnectionPoolDataSource properties" />
|
|
<meta name="abstract" content="You can configure the ConnectionPoolDataSource interface by using the set of properties that it provides." />
|
|
<meta name="description" content="You can configure the ConnectionPoolDataSource interface by using the set of properties that it provides." />
|
|
<meta name="DC.Relation" scheme="URI" content="jdbcpool.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="poolwdts.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="poolstat.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="poolnods.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="poolprop" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>ConnectionPoolDataSource properties</title>
|
|
</head>
|
|
<body id="poolprop"><a name="poolprop"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">ConnectionPoolDataSource properties</h1>
|
|
<div><p>You can configure the ConnectionPoolDataSource interface by using
|
|
the set of properties that it provides.</p>
|
|
<div class="section">Descriptions of these properties are provided in the
|
|
following table.</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" valign="top" id="d0e20">Property</th>
|
|
<th align="left" valign="top" id="d0e22">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" headers="d0e20 ">initialPoolSize</td>
|
|
<td valign="top" headers="d0e22 ">When the pool is first instantiated, this property determines how many
|
|
connections are placed into the pool. If this value is specified outside the
|
|
range of minPoolSize and maxPoolSize, either minPoolSize or maxPoolSize is
|
|
used as the number of initial connections to create.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e20 ">maxPoolSize</td>
|
|
<td valign="top" headers="d0e22 ">As the pool is used, more connections may be requested than the pool
|
|
has in it. This property specifies the maximum number of connections allowed
|
|
to be created in the pool. <p>Applications do not "block" and wait for
|
|
a connection to be returned to the pool when the pool is at its maximum size
|
|
and all connections are in use. Instead, the JDBC driver constructs a new
|
|
connection based on the DataSource properties and returns the connection.</p>
|
|
|
|
<p>If a maxPoolSize of 0 is specified, the pool is allowed to grow unbounded
|
|
as long as the system has resources available to hand out.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e20 "> minPoolSize</td>
|
|
<td valign="top" headers="d0e22 ">Spikes in using the pool can cause it to increase the number of connections
|
|
in it. If the activity level diminishes to the point where some Connections
|
|
are never pulled out of the pool, the resources are being taken up for no
|
|
particular reason. <p>In such cases, the JDBC driver has the ability to release
|
|
some of the connections that it has accumulated. This property allows you
|
|
to tell the JDBC to release connections, ensuring that it always has a certain
|
|
number of connections available to use.</p>
|
|
<p>If a minPoolSize of 0 is
|
|
specified, it is possible for the pool to free all of its connections and
|
|
for the application to actually pay for the connection time for each connection
|
|
request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e20 ">maxIdleTime</td>
|
|
<td valign="top" headers="d0e22 ">Connections keep track of how long they have been sitting around without
|
|
being used. This property specifies how long an application allows connections
|
|
to be unused before they are released (that is, there are more connections
|
|
than are needed). <p>This property is a time in seconds and does not specify
|
|
when the actual close occurs. It specifies when enough time has passed that
|
|
the connection should be released.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e20 ">propertyCycle</td>
|
|
<td valign="top" headers="d0e22 ">This property represents the number of seconds that are allowed to
|
|
pass between the enforcement of these rules.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> Setting either the maxIdleTime or the propertyCycle time to
|
|
0 means that the JDBC driver does not check for connections to be removed
|
|
from the pool on its own. The rules specified for initial, min, and max size
|
|
are still enforced.<p>When maxIdleTime and propertyCycle are not 0, a management
|
|
thread is used to watch over the pool. The thread wakes up every propertyCycle
|
|
second and checks all the connections in the pool to see which ones have been
|
|
there without being used for more than maxIdleTime seconds. Connections fitting
|
|
this criterion are removed from the pool until the minPoolSize is reached. </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="jdbcpool.htm" title="Object pooling is the most common topic to come up when discussing Java Database Connectivity (JDBC) and performance. Since many objects used in JDBC are expensive to create such as Connection, Statement, and ResultSet objects, significant performance benefits can be achieved by reusing these objects instead of creating every time you need them.">JDBC object pooling</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="poolwdts.htm" title="You can use DataSources to have multiple applications share a common configuration for accessing a database. This is accomplished by having each application reference the same DataSource name.">Use DataSource support for object pooling</a></div>
|
|
<div><a href="poolstat.htm" title="The maxStatements property, available on the UDBConnectionPoolDataSource interface, allows for statement pooling within the connection pool. Statement pooling only has an effect on PreparedStatements and CallableStatements. Statement objects are not pooled.">DataSource-based statement pooling</a></div>
|
|
<div><a href="poolnods.htm" title="You can develop your own connection and statement pooling without requiring support for DataSources or relying on another product.">Build your own connection pooling</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |