Author: psteitz
Date: Mon Feb 16 19:34:19 2015
New Revision: 1660185

URL: http://svn.apache.org/r1660185
Log:
Fixed abandoned connection cleanup config doc.  Thanks to Denixx Baykin. JIRA: 
DBCP-435.

Modified:
    commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml

Modified: commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml?rev=1660185&r1=1660184&r2=1660185&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml (original)
+++ commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml Mon Feb 16 
19:34:19 2015
@@ -375,24 +375,33 @@ Be careful and only use when you need di
 <table>
 <hr><th>Parameter</th><th>Default</th><th>Description</th></hr>
 <tr>
-   <td>removeAbandoned</td>
+   <td>removeAbandonedOnMaintenance <br/>
+       removeAbandonedOnBorrow
+   </td>
    <td>false</td>
    <td>
-      Flag to remove abandoned connections if they exceed the
+      Flags to remove abandoned connections if they exceed the
       removeAbandonedTimout.<br/>
-      If set to true a connection is considered abandoned and eligible
-      for removal if it has not been used for longer than the 
removeAbandonedTimeout.<br/>
+      A connection is considered abandoned and eligible
+      for removal if it has not been used for longer than 
removeAbandonedTimeout.<br/>
       Creating a Statement, PreparedStatement or CallableStatement or using
       one of these to execute a query (using one of the execute methods)
       resets the lastUsed property of the parent connection.<br/>
-      Setting this to true can recover db connections from poorly written
-      applications which fail to close a connection.
+      Setting one or both of these to true can recover db connections from 
poorly written
+      applications which fail to close connections.<br/>
+      Setting removeAbandonedOnMaintenance to true removes abandoned 
connections on the
+      maintenance cycle (when eviction ends). This property has no effect 
unless maintenance
+      is enabled by setting timeBetweenEvicionRunsMillis to a positive value. 
<br/>
+      If removeAbandonedOnBorrow is true, abandoned connections are removed 
each time
+      a connection is borrowed from the pool, with the additional requirements 
that
+      <ul><li>getNumActive() &gt; getMaxTotal() - 3; and</li>
+          <li>getNumIdle() &lt; 2 </li></ul>
    </td>
 </tr>
 <tr>
    <td>removeAbandonedTimeout</td>
    <td>300</td>
-   <td>Timeout in seconds before an abandoned connection can be removed.</td>
+   <td>Timeout in <b>seconds</b> before an abandoned connection can be 
removed.</td>
 </tr>
 <tr>
    <td>logAbandoned</td>
@@ -408,17 +417,15 @@ Be careful and only use when you need di
 </table>
 <p>
 <img src="images/icon_info_sml.gif"/>
-If you have enabled "removeAbandoned" then it is possible that a connection is 
reclaimed by the pool because
-it is considered to be abandoned. This mechanism is triggered when 
(getNumIdle() &lt; 2) and
-(getNumActive() &gt; getMaxTotal() - 3)
-</p>
-<p>
-<img src="images/icon_info_sml.gif"/>
-For example, maxTotal=20 and 18 active connections and 1 idle connection would 
trigger the "removeAbandoned".
-But only the active connections that aren't used for more then 
"removeAbandonedTimeout" seconds are removed,
-default (300 sec). Traversing a resultset doesn't count as being used. 
Creating a Statement, PreparedStatement
-or CallableStatement or using one of these to execute a query (using one of 
the execute methods) resets
-the lastUsed property of the parent connection.
+If you have enabled removeAbandonedOnMaintenance or removeAbandonedOnBorrow 
then it is possible that
+a connection is reclaimed by the pool because it is considered to be 
abandoned. This mechanism is triggered
+when (getNumIdle() &lt; 2) and (getNumActive() &gt; getMaxTotal() - 3) and 
removeAbandonedOnBorrow is true;
+or after eviction finishes and removeAbandonedOnMaintenance is true. For 
example, maxTotal=20 and 18 active
+connections and 1 idle connection would trigger removeAbandonedOnBorrow, but 
only the active connections
+that aren't used for more then "removeAbandonedTimeout" seconds are removed 
(default 300 sec). Traversing
+a resultset doesn't count as being used. Creating a Statement, 
PreparedStatement or CallableStatement or
+using one of these to execute a query (using one of the execute methods) 
resets the lastUsed property of
+the parent connection.
 </p>
 <table>
 <hr><th>Parameter</th><th>Default</th><th>Description</th></hr>


Reply via email to