commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1568985 - in /commons/proper/dbcp/trunk: doc/ src/main/java/org/apache/commons/dbcp2/ src/main/java/org/apache/commons/dbcp2/datasources/ src/site/xdoc/ src/site/xdoc/guide/ src/test/java/org/apache/commons/dbcp2/ src/test/java/org/apache/...
Date Mon, 17 Feb 2014 13:33:43 GMT
Author: markt
Date: Mon Feb 17 13:33:43 2014
New Revision: 1568985

URL: http://svn.apache.org/r1568985
Log:
Complete rename of maxActive to maxTotal

Modified:
    commons/proper/dbcp/trunk/doc/abandon.jsp
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/package.html
    commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml
    commons/proper/dbcp/trunk/src/site/xdoc/guide/jndi-howto.xml
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestBasicDataSourceFactory.java
    commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java

Modified: commons/proper/dbcp/trunk/doc/abandon.jsp
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/abandon.jsp?rev=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/doc/abandon.jsp (original)
+++ commons/proper/dbcp/trunk/doc/abandon.jsp Mon Feb 17 13:33:43 2014
@@ -38,7 +38,7 @@
       <parameter><name>removeAbandonedTimeout</name><value>0</value></parameter>
       <parameter><name>logAbandoned</name><value>true</value></parameter>
 
-      <parameter><name>maxActive</name><value>1</value></parameter>
+      <parameter><name>maxTotal</name><value>1</value></parameter>
     </ResourceParams>
 -->
 

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java?rev=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
Mon Feb 17 13:33:43 2014
@@ -1617,7 +1617,7 @@ public class BasicDataSource
      * <li>{@link #getRemoveAbandonedOnBorrow()} or
      *     {@link #getRemoveAbandonedOnMaintenance()} = true</li>
      * <li>{@link #getNumIdle() numIdle} &lt; 2</li>
-     * <li>{@link #getNumActive() numActive} &gt; {@link #getMaxTotal() maxActive}
- 3</li>
+     * <li>{@link #getNumActive() numActive} &gt; {@link #getMaxTotal() maxTotal}
- 3</li>
      * </ul></code></p>
      *
      * <p>The default value is 300 seconds.</p>

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java?rev=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
Mon Feb 17 13:33:43 2014
@@ -58,7 +58,7 @@ public class BasicDataSourceFactory impl
     private final static String PROP_CACHESTATE ="cacheState";
     private final static String PROP_DRIVERCLASSNAME = "driverClassName";
     private final static String PROP_LIFO = "lifo";
-    private final static String PROP_MAXACTIVE = "maxActive";
+    private final static String PROP_MAXTOTAL = "maxTotal";
     private final static String PROP_MAXIDLE = "maxIdle";
     private final static String PROP_MINIDLE = "minIdle";
     private final static String PROP_INITIALSIZE = "initialSize";
@@ -105,7 +105,7 @@ public class BasicDataSourceFactory impl
         PROP_CACHESTATE,
         PROP_DRIVERCLASSNAME,
         PROP_LIFO,
-        PROP_MAXACTIVE,
+        PROP_MAXTOTAL,
         PROP_MAXIDLE,
         PROP_MINIDLE,
         PROP_INITIALSIZE,
@@ -254,7 +254,7 @@ public class BasicDataSourceFactory impl
             dataSource.setLifo(Boolean.valueOf(value).booleanValue());
         }
 
-        value = properties.getProperty(PROP_MAXACTIVE);
+        value = properties.getProperty(PROP_MAXTOTAL);
         if (value != null) {
             dataSource.setMaxTotal(Integer.parseInt(value));
         }

Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/package.html
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/package.html?rev=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/package.html
(original)
+++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/package.html
Mon Feb 17 13:33:43 2014
@@ -49,7 +49,7 @@ webapp:
       &lt;name&gt;dataSourceName&lt;/name&gt;&lt;value&gt;java:comp/env/jdbc/bookstoreCPDS&lt;/value&gt;
     &lt;/parameter&gt;
     &lt;parameter&gt;
-      &lt;name&gt;defaultMaxActive&lt;/name&gt;&lt;value&gt;30&lt;/value&gt;
+      &lt;name&gt;defaultMaxTotal&lt;/name&gt;&lt;value&gt;30&lt;/value&gt;
     &lt;/parameter&gt;
 
   &lt;/ResourceParams&gt;
@@ -150,7 +150,7 @@ public class Pool
 
         SharedPoolDataSource tds = new SharedPoolDataSource();
         tds.setConnectionPoolDataSource(cpds);
-        tds.setMaxActive(10);
+        tds.setMaxTotal(10);
         tds.setMaxWaitMillis(50);
 
         ds = tds;

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=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml (original)
+++ commons/proper/dbcp/trunk/src/site/xdoc/configuration.xml Mon Feb 17 13:33:43 2014
@@ -32,7 +32,7 @@
 
 <!--
 <section name="Dynamic Properties">
-maxActive
+maxTotal
 maxIdle
 minIdle
 maxWaitMillis
@@ -140,7 +140,7 @@ testWhileIdle
    </td>
 </tr>
 <tr>
-   <td>maxActive</td>
+   <td>maxTotal</td>
    <td>8</td>
    <td>
       The maximum number of active connections that can be allocated from
@@ -392,11 +392,11 @@ Be carefull and only use when you need d
 <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; getMaxActive() - 3)
+(getNumActive() &gt; getMaxTotal() - 3)
 </p>
 <p>
 <img src="images/icon_info_sml.gif"/>
-For example, maxActive=20 and 18 active connections and 1 idle connection would trigger the
"removeAbandoned".
+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

Modified: commons/proper/dbcp/trunk/src/site/xdoc/guide/jndi-howto.xml
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/site/xdoc/guide/jndi-howto.xml?rev=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/site/xdoc/guide/jndi-howto.xml (original)
+++ commons/proper/dbcp/trunk/src/site/xdoc/guide/jndi-howto.xml Mon Feb 17 13:33:43 2014
@@ -91,7 +91,7 @@
   Reference ref = new Reference("org.apache.commons.dbcp2.datasources.PerUserPoolDataSource",
     "org.apache.commons.dbcp2.datasources.PerUserPoolDataSourceFactory", null);
   ref.add(new StringRefAddr("dataSourceName", "jdbc/cpds"));
-  ref.add(new StringRefAddr("defaultMaxActive", "100"));
+  ref.add(new StringRefAddr("defaultMaxTotal", "100"));
   ref.add(new StringRefAddr("defaultMaxIdle", "30"));
   ref.add(new StringRefAddr("defaultMaxWaitMillis", "10000"));
   ic.rebind("jdbc/peruser", ref);

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestBasicDataSourceFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestBasicDataSourceFactory.java?rev=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestBasicDataSourceFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/TestBasicDataSourceFactory.java
Mon Feb 17 13:33:43 2014
@@ -53,7 +53,7 @@ public class TestBasicDataSourceFactory 
         Properties properties = new Properties();
         properties.setProperty("driverClassName", "org.apache.commons.dbcp2.TesterDriver");
         properties.setProperty("url", "jdbc:apache:commons:testdriver");
-        properties.setProperty("maxActive", "10");
+        properties.setProperty("maxTotal", "10");
         properties.setProperty("maxIdle", "8");
         properties.setProperty("minIdle", "0");
         properties.setProperty("maxWaitMillis", "500");

Modified: commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java?rev=1568985&r1=1568984&r2=1568985&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/test/java/org/apache/commons/dbcp2/datasources/TestPerUserPoolDataSource.java
Mon Feb 17 13:33:43 2014
@@ -347,7 +347,7 @@ public class TestPerUserPoolDataSource e
     public void testPerUserMethods() throws Exception {
         PerUserPoolDataSource tds = (PerUserPoolDataSource) ds;
 
-        // you need to set maxActive otherwise there is no accounting
+        // you need to set per user maxTotal otherwise there is no accounting
         tds.setPerUserMaxTotal("u1", Integer.valueOf(5));
         tds.setPerUserMaxTotal("u2", Integer.valueOf(5));
 



Mime
View raw message