commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1659726 - in /commons/proper/dbcp/trunk/doc: BasicDataSourceExample.java PoolingDataSourceExample.java PoolingDriverExample.java
Date Sat, 14 Feb 2015 00:04:17 GMT
Author: psteitz
Date: Sat Feb 14 00:04:17 2015
New Revision: 1659726

URL: http://svn.apache.org/r1659726
Log:
Updated component versions; made PCF pool-setting consistent. JIRA: DBCP-412.

Modified:
    commons/proper/dbcp/trunk/doc/BasicDataSourceExample.java
    commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java
    commons/proper/dbcp/trunk/doc/PoolingDriverExample.java

Modified: commons/proper/dbcp/trunk/doc/BasicDataSourceExample.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/BasicDataSourceExample.java?rev=1659726&r1=1659725&r2=1659726&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/doc/BasicDataSourceExample.java (original)
+++ commons/proper/dbcp/trunk/doc/BasicDataSourceExample.java Sat Feb 14 00:04:17 2015
@@ -39,18 +39,17 @@ import org.apache.commons.dbcp2.BasicDat
 
 //
 // To compile this example, you'll want:
-//  * commons-pool-1.5.6.jar
-//  * commons-dbcp-1.3.jar (JDK 1.4-1.5) or commons-dbcp-1.4 (JDK 1.6+)
-//  * j2ee.jar (for the javax.sql classes)
+//  * commons-pool-2.3.jar
+//  * commons-dbcp-2.1.jar 
 // in your classpath.
 //
 // To run this example, you'll want:
-//  * commons-pool-1.5.6.jar
-//  * commons-dbcp-1.3.jar (JDK 1.4-1.5) or commons-dbcp-1.4 (JDK 1.6+)
-//  * j2ee.jar (for the javax.sql classes)
-//  * the classes for your (underlying) JDBC driver
+//  * commons-pool-2.3.jar
+//  * commons-dbcp-2.1.jar 
+//  * commons-logging-1.2.jar
 // in your classpath.
 //
+//
 // Invoke the class using two arguments:
 //  * the connect string for your underlying JDBC driver
 //  * the query you'd like to execute
@@ -60,7 +59,7 @@ import org.apache.commons.dbcp2.BasicDat
 //
 // For example:
 //  java -Djdbc.drivers=oracle.jdbc.driver.OracleDriver \
-//       -classpath commons-pool-1.5.6.jar:commons-dbcp-1.4.jar:j2ee.jar:oracle-jdbc.jar:.
\
+//       -classpath commons-pool-2.3.jar:commons-dbcp-2.1.jar:oracle-jdbc.jar:commons-logging-1.2.jar.
\
 //       PoolingDataSourceExample
 //       "jdbc:oracle:thin:scott/tiger@myhost:1521:mysid"
 //       "SELECT * FROM DUAL"

Modified: commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java?rev=1659726&r1=1659725&r2=1659726&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java (original)
+++ commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java Sat Feb 14 00:04:17 2015
@@ -47,14 +47,14 @@ import org.apache.commons.dbcp2.DriverMa
 
 //
 // To compile this example, you'll want:
-//  * commons-pool2-2.2.jar
-//  * commons-dbcp2-2.0.jar
+//  * commons-pool2-2.3.jar
+//  * commons-dbcp2-2.1.jar
 // in your classpath.
 //
 // To run this example, you'll want:
-//  * commons-pool2-2.2.jar
-//  * commons-dbcp2-2.0.jar
-//  * commons-logging-1.1.3.jar
+//  * commons-pool2-2.3.jar
+//  * commons-dbcp2-2.1.jar
+//  * commons-logging-1.2.jar
 //  * the classes for your (underlying) JDBC driver
 // in your classpath.
 //
@@ -67,7 +67,7 @@ import org.apache.commons.dbcp2.DriverMa
 //
 // For example:
 //  java -Djdbc.drivers=org.h2.Driver \
-//       -classpath commons-pool2-2.2.jar:commons-dbcp2-2.0.jar:commons-logging-1.1.3.jar:h2-1.3.152.jar:.
\
+//       -classpath commons-pool2-2.3.jar:commons-dbcp2-2.1.jar:commons-logging-1.2.jar:h2-1.3.152.jar:.
\
 //       PoolingDataSourceExample \
 //       "jdbc:h2:~/test" \
 //       "SELECT 1"

Modified: commons/proper/dbcp/trunk/doc/PoolingDriverExample.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/PoolingDriverExample.java?rev=1659726&r1=1659725&r2=1659726&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/doc/PoolingDriverExample.java (original)
+++ commons/proper/dbcp/trunk/doc/PoolingDriverExample.java Sat Feb 14 00:04:17 2015
@@ -39,17 +39,15 @@ import org.apache.commons.dbcp2.DriverMa
 // Here's a simple example of how to use the PoolingDriver.
 //
 
-//
 // To compile this example, you'll want:
-//  * commons-pool-1.5.6.jar
-//  * commons-dbcp-1.3.jar (JDK 1.4-1.5) or commons-dbcp-1.4 (JDK 1.6+)
+//  * commons-pool-2.3.jar
+//  * commons-dbcp-2.1.jar 
 // in your classpath.
 //
 // To run this example, you'll want:
-//  * commons-collections.jar
-//  * commons-pool-1.5.6.jar
-//  * commons-dbcp-1.3.jar (JDK 1.4-1.5) or commons-dbcp-1.4 (JDK 1.6+)
-//  * the classes for your (underlying) JDBC driver
+//  * commons-pool-2.3.jar
+//  * commons-dbcp-2.1.jar 
+//  * commons-logging-1.2.jar
 // in your classpath.
 //
 // Invoke the class using two arguments:
@@ -61,7 +59,7 @@ import org.apache.commons.dbcp2.DriverMa
 //
 // For example:
 //  java -Djdbc.drivers=oracle.jdbc.driver.OracleDriver \
-//       -classpath commons-pool-1.5.6.jar:commons-dbcp-1.4.jar:oracle-jdbc.jar:. \
+//       -classpath commons-pool-2.3.jar:commons-dbcp-2.1.jar:oracle-jdbc.jar:commons-logging-1.2.jar.
\
 //       PoolingDriverExample \
 //       "jdbc:oracle:thin:scott/tiger@myhost:1521:mysid" \
 //       "SELECT * FROM DUAL"
@@ -174,6 +172,9 @@ public class PoolingDriverExample {
         //
         ObjectPool<PoolableConnection> connectionPool =
             new GenericObjectPool<>(poolableConnectionFactory);
+        
+        // Set the factory's pool property to the owning pool
+        poolableConnectionFactory.setPool(connectionPool);
 
         //
         // Finally, we create the PoolingDriver itself...



Mime
View raw message