You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by sc...@apache.org on 2014/03/05 16:47:12 UTC

svn commit: r1574541 - in /tomcat/trunk/webapps/docs: jndi-datasource-examples-howto.xml jndi-resources-howto.xml

Author: schultz
Date: Wed Mar  5 15:47:11 2014
New Revision: 1574541

URL: http://svn.apache.org/r1574541
Log:
Align documentation of DBCP examples to match changes from DBCP 1 -> DBCP 2. Specifically, change "maxActive" -> "maxTotal" and "maxWait" -> "maxWaitMillis" in all examples.

Modified:
    tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml
    tomcat/trunk/webapps/docs/jndi-resources-howto.xml

Modified: tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml?rev=1574541&r1=1574540&r2=1574541&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml (original)
+++ tomcat/trunk/webapps/docs/jndi-datasource-examples-howto.xml Wed Mar  5 15:47:11 2014
@@ -106,7 +106,7 @@ a <code>ServletContextListener</code>.
 
 </section>
 
-<section name="Database Connection Pool (DBCP) Configurations">
+<section name="Database Connection Pool (DBCP 2) Configurations">
 
 <p>The default database connection pool implementation in Apache Tomcat
 relies on the libraries from the
@@ -251,7 +251,7 @@ resource to your <a href="config/context
 <p>For example:</p>
 <source><![CDATA[<Context>
 
-    <!-- maxActive: Maximum number of database connections in pool. Make sure you
+    <!-- maxTotal: Maximum number of database connections in pool. Make sure you
          configure your mysqld max_connections large enough to handle
          all of your db connections. Set to -1 for no limit.
          -->
@@ -261,7 +261,7 @@ resource to your <a href="config/context
          and the minEvictableIdleTimeMillis configuration parameter.
          -->
 
-    <!-- maxWait: Maximum time to wait for a database connection to become available
+    <!-- maxWaitMillis: Maximum time to wait for a database connection to become available
          in ms, in this example 10 seconds. An Exception is thrown if
          this timeout is exceeded.  Set to -1 to wait indefinitely.
          -->
@@ -277,7 +277,7 @@ resource to your <a href="config/context
          -->
 
   <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
-               maxActive="100" maxIdle="30" maxWait="10000"
+               maxTotal="100" maxIdle="30" maxWaitMillis="10000"
                username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
                url="jdbc:mysql://localhost:3306/javatest"/>
 
@@ -374,8 +374,8 @@ user scott.</p>
 <source><![CDATA[<Resource name="jdbc/myoracle" auth="Container"
               type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
               url="jdbc:oracle:thin:@127.0.0.1:1521:mysid"
-              username="scott" password="tiger" maxActive="20" maxIdle="10"
-              maxWait="-1"/>]]></source>
+              username="scott" password="tiger" maxTotal="20" maxIdle="10"
+              maxWaitMillis="-1"/>]]></source>
 
 <h5>2.    web.xml configuration</h5>
 <p>You should ensure that you respect the element ordering defined by the DTD when you
@@ -427,7 +427,7 @@ Clarification would be appreciated here.
 <source><![CDATA[<Resource name="jdbc/postgres" auth="Container"
           type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
           url="jdbc:postgresql://127.0.0.1:5432/mydb"
-          username="myuser" password="mypasswd" maxActive="20" maxIdle="10" maxWait="-1"/>]]></source>
+          username="myuser" password="mypasswd" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>]]></source>
 <h6>2b. Application-specific resource configuration</h6>
 
 <p>
@@ -446,8 +446,8 @@ The Context element should look somethin
 <Resource name="jdbc/postgres" auth="Container"
           type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
           url="jdbc:postgresql://127.0.0.1:5432/mydb"
-          username="myuser" password="mypasswd" maxActive="20" maxIdle="10"
-maxWait="-1"/>
+          username="myuser" password="mypasswd" maxTotal="20" maxIdle="10"
+maxWaitMillis="-1"/>
 </Context>]]></source>
 
 <h5>3. web.xml configuration</h5>
@@ -577,7 +577,7 @@ than one second.  The remainder will onl
 if ever should a GC take more than 10 seconds.</p>
 
 <p>Make sure that the db connection timeout is set to 10-15 seconds.
-For the DBCP you set this using the parameter <code>maxWait</code>.</p>
+For the DBCP you set this using the parameter <code>maxWaitMillis</code>.</p>
 
 </subsection>
 

Modified: tomcat/trunk/webapps/docs/jndi-resources-howto.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jndi-resources-howto.xml?rev=1574541&r1=1574540&r2=1574541&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/jndi-resources-howto.xml (original)
+++ tomcat/trunk/webapps/docs/jndi-resources-howto.xml Wed Mar  5 15:47:11 2014
@@ -644,7 +644,7 @@ conn.close();]]></source>
             password="dbpassword"
             driverClassName="org.hsql.jdbcDriver"
             url="jdbc:HypersonicSQL:database"
-            maxActive="8"
+            maxTotal="8"
             maxIdle="4"/>
   ...
 </Context>]]></source>
@@ -673,13 +673,13 @@ conn.close();]]></source>
         is also recognized.)</li>
     <li><strong>initialSize</strong> - The initial number of connections
         that will be created in the pool during pool initialization. Default: 0</li>
-    <li><strong>maxActive</strong> - The maximum number of connections
+    <li><strong>maxTotal</strong> - The maximum number of connections
         that can be allocated from this pool at the same time. Default: 8</li>
     <li><strong>minIdle</strong> - The minimum number of connections that
         will sit idle in this pool at the same time. Default: 0</li>
     <li><strong>maxIdle</strong> - The maximum number of connections that
         can sit idle in this pool at the same time. Default: 8</li>
-    <li><strong>maxWait</strong> - The maximum number of milliseconds that the
+    <li><strong>maxWaitMillis</strong> - The maximum number of milliseconds that the
         pool will wait (when there are no available connections) for a
         connection to be returned before throwing an exception. Default: -1 (infinite)</li>
     </ul>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org