Update imports to use pool2
authorMark Thomas <markt@apache.org>
Thu, 5 May 2011 17:16:15 +0000 (17:16 +0000)
committerMark Thomas <markt@apache.org>
Thu, 5 May 2011 17:16:15 +0000 (17:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbcp/trunk@1099876 13f79535-47bb-0310-9956-ffa450edef68

34 files changed:
doc/ManualPoolingDataSourceExample.java
doc/ManualPoolingDriverExample.java
src/java/org/apache/commons/dbcp2/AbandonedObjectPool.java
src/java/org/apache/commons/dbcp2/BasicDataSource.java
src/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
src/java/org/apache/commons/dbcp2/PoolableConnection.java
src/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
src/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
src/java/org/apache/commons/dbcp2/PoolingConnection.java
src/java/org/apache/commons/dbcp2/PoolingDataSource.java
src/java/org/apache/commons/dbcp2/PoolingDriver.java
src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
src/java/org/apache/commons/dbcp2/cpdsadapter/PoolablePreparedStatementStub.java
src/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java
src/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
src/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
src/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
src/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
src/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
src/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
src/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
src/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java
src/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
src/test/org/apache/commons/dbcp2/TestAbandonedObjectPool.java
src/test/org/apache/commons/dbcp2/TestDelegatingConnection.java
src/test/org/apache/commons/dbcp2/TestDriverManagerConnectionFactory.java
src/test/org/apache/commons/dbcp2/TestManual.java
src/test/org/apache/commons/dbcp2/TestPStmtPooling.java
src/test/org/apache/commons/dbcp2/TestPoolableConnection.java
src/test/org/apache/commons/dbcp2/TestPoolingDataSource.java
src/test/org/apache/commons/dbcp2/datasources/TestCPDSConnectionFactory.java
src/test/org/apache/commons/dbcp2/datasources/TestKeyedCPDSConnectionFactory.java
src/test/org/apache/commons/dbcp2/managed/TestManagedDataSource.java

index f1611a2..b665b23 100644 (file)
@@ -27,8 +27,8 @@ import java.sql.SQLException;
 // method. In normal use, your classes interact
 // only with the standard JDBC API
 //
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 import org.apache.commons.dbcp2.ConnectionFactory;
 import org.apache.commons.dbcp2.PoolingDataSource;
 import org.apache.commons.dbcp2.PoolableConnectionFactory;
index 70d49b4..d61734f 100644 (file)
@@ -27,8 +27,8 @@ import java.sql.SQLException;
 // method. In normal use, your classes interact
 // only with the standard JDBC API
 //
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 import org.apache.commons.dbcp2.ConnectionFactory;
 import org.apache.commons.dbcp2.PoolingDriver;
 import org.apache.commons.dbcp2.PoolableConnectionFactory;
index b239941..ae8494a 100644 (file)
@@ -21,8 +21,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.commons.pool.PoolableObjectFactory;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.PoolableObjectFactory;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * <p>An implementation of a Jakarta-Commons ObjectPool which
index 9bb68da..3f67428 100644 (file)
@@ -30,10 +30,10 @@ import java.sql.DriverManager;
 import java.sql.SQLException;
 import javax.sql.DataSource;
 
-import org.apache.commons.pool.KeyedObjectPoolFactory;
-import org.apache.commons.pool.impl.GenericKeyedObjectPool;
-import org.apache.commons.pool.impl.GenericKeyedObjectPoolFactory;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.KeyedObjectPoolFactory;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPoolFactory;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 
 /**
index 505ac63..1a32503 100644 (file)
@@ -23,7 +23,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.List;
 
-import org.apache.commons.pool.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedObjectPool;
 
 /**
  * A {@link DelegatingCallableStatement} that cooperates with
index 7971858..de7967a 100644 (file)
@@ -19,7 +19,7 @@ package org.apache.commons.dbcp2;
 
 import java.sql.Connection;
 import java.sql.SQLException;
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.ObjectPool;
 
 /**
  * A delegating connection that, rather than closing the underlying
index a247dbe..8ce2b6b 100644 (file)
@@ -23,10 +23,10 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.Collection;
 import java.util.Iterator;
-import org.apache.commons.pool.KeyedObjectPool;
-import org.apache.commons.pool.KeyedObjectPoolFactory;
-import org.apache.commons.pool.PoolableObjectFactory;
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedObjectPoolFactory;
+import org.apache.commons.pool2.PoolableObjectFactory;
+import org.apache.commons.pool2.ObjectPool;
 
 /**
  * A {@link PoolableObjectFactory} that creates
index 8a9d84e..2051ea4 100644 (file)
@@ -23,7 +23,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.List;
 
-import org.apache.commons.pool.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedObjectPool;
 
 /**
  * A {@link DelegatingPreparedStatement} that cooperates with
index 8fa556e..23be67a 100644 (file)
@@ -24,8 +24,8 @@ import java.sql.SQLException;
 
 import java.util.NoSuchElementException;
 
-import org.apache.commons.pool.KeyedObjectPool;
-import org.apache.commons.pool.KeyedPoolableObjectFactory;
+import org.apache.commons.pool2.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedPoolableObjectFactory;
 
 /**
  * A {@link DelegatingConnection} that pools {@link PreparedStatement}s.
index 533a162..eae43d3 100644 (file)
@@ -30,7 +30,7 @@ import java.util.NoSuchElementException;
 
 import javax.sql.DataSource;
 
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.ObjectPool;
 
 /**
  * A simple {@link DataSource} implementation that obtains
index 4186723..2b6031a 100644 (file)
@@ -36,7 +36,7 @@ import java.util.Properties;
 import java.util.Set;
 
 import org.apache.commons.jocl2.JOCLContentHandler;
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.ObjectPool;
 import org.xml.sax.SAXException;
 
 
index 5082a48..3a5a8b0 100644 (file)
@@ -34,8 +34,8 @@ import javax.naming.RefAddr;
 import javax.naming.StringRefAddr;
 import javax.naming.NamingException;
 
-import org.apache.commons.pool.KeyedObjectPool;
-import org.apache.commons.pool.impl.GenericKeyedObjectPool;
+import org.apache.commons.pool2.KeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
 
 /**
  * <p>
@@ -183,7 +183,7 @@ public class DriverAdapterCPDS
             {
                 // since there is limit, create a prepared statement pool without an eviction thread
                 //  pool has LRU functionality so when the limit is reached, 15% of the pool is cleared.
-                // see org.apache.commons.pool.impl.GenericKeyedObjectPool.clearOldest method
+                // see org.apache.commons.pool2.impl.GenericKeyedObjectPool.clearOldest method
                 stmtPool = new GenericKeyedObjectPool(null,
                     getMaxActive(), GenericKeyedObjectPool.WHEN_EXHAUSTED_GROW, 0,
                     getMaxIdle(), getMaxPreparedStatements(), false, false,
index 6f79c7b..18e46fc 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.commons.dbcp2.cpdsadapter;
 import java.sql.PreparedStatement;
 import java.sql.Connection;
 import java.sql.SQLException;
-import org.apache.commons.pool.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedObjectPool;
 import org.apache.commons.dbcp2.PoolablePreparedStatement;
 
 /**
index fe2d460..ba1c958 100644 (file)
@@ -33,8 +33,8 @@ import javax.sql.StatementEventListener;
 import org.apache.commons.dbcp2.DelegatingConnection;
 import org.apache.commons.dbcp2.DelegatingPreparedStatement;
 import org.apache.commons.dbcp2.SQLNestedException;
-import org.apache.commons.pool.KeyedObjectPool;
-import org.apache.commons.pool.KeyedPoolableObjectFactory;
+import org.apache.commons.pool2.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedPoolableObjectFactory;
 
 /**
  * Implementation of PooledConnection that is returned by
index 274857b..720b190 100644 (file)
@@ -30,8 +30,8 @@ import javax.sql.ConnectionEventListener;
 import javax.sql.ConnectionPoolDataSource;
 import javax.sql.PooledConnection;
 
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.PoolableObjectFactory;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.PoolableObjectFactory;
 
 /**
  * A {@link PoolableObjectFactory} that creates
index 19fb5f2..c7889cd 100644 (file)
@@ -35,7 +35,7 @@ import javax.sql.DataSource;
 import javax.sql.PooledConnection;
 
 import org.apache.commons.dbcp2.SQLNestedException;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * <p>The base class for <code>SharedPoolDataSource</code> and 
index 533048a..b227faf 100644 (file)
@@ -30,8 +30,8 @@ import javax.sql.ConnectionEventListener;
 import javax.sql.ConnectionPoolDataSource;
 import javax.sql.PooledConnection;
 
-import org.apache.commons.pool.KeyedObjectPool;
-import org.apache.commons.pool.KeyedPoolableObjectFactory;
+import org.apache.commons.pool2.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedPoolableObjectFactory;
 
 /**
  * A {*link PoolableObjectFactory} that creates
@@ -112,7 +112,7 @@ class KeyedCPDSConnectionFactory
      * 
      * @param key {@link UserPassKey} containing user credentials
      * @throws SQLException if the connection could not be created.
-     * @see org.apache.commons.pool.KeyedPoolableObjectFactory#makeObject(java.lang.Object)
+     * @see org.apache.commons.pool2.KeyedPoolableObjectFactory#makeObject(java.lang.Object)
      */
     public synchronized Object makeObject(Object key) throws Exception {
         Object obj = null;
index c037fbc..4bcb3b7 100644 (file)
@@ -33,8 +33,8 @@ import javax.sql.ConnectionPoolDataSource;
 
 import org.apache.commons.dbcp2.SQLNestedException;
 
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * <p>A pooling <code>DataSource</code> appropriate for deployment within
index 13da499..5be9234 100644 (file)
@@ -27,9 +27,9 @@ import javax.naming.Reference;
 import javax.naming.StringRefAddr;
 import javax.sql.ConnectionPoolDataSource;
 
-import org.apache.commons.pool.KeyedObjectPool;
-import org.apache.commons.pool.impl.GenericKeyedObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.KeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 import org.apache.commons.dbcp2.SQLNestedException;
 
 /**
index 04fc0ea..cc9a407 100644 (file)
@@ -22,7 +22,7 @@ import org.apache.commons.dbcp2.BasicDataSource;
 import org.apache.commons.dbcp2.ConnectionFactory;
 import org.apache.commons.dbcp2.PoolableConnectionFactory;
 import org.apache.commons.dbcp2.PoolingDataSource;
-import org.apache.commons.pool.KeyedObjectPoolFactory;
+import org.apache.commons.pool2.KeyedObjectPoolFactory;
 
 import javax.sql.XADataSource;
 import javax.transaction.TransactionManager;
index 6aa6b91..4ac14d6 100644 (file)
@@ -18,7 +18,7 @@
 package org.apache.commons.dbcp2.managed;
 
 import org.apache.commons.dbcp2.DelegatingConnection;
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.ObjectPool;
 
 import java.sql.Connection;
 import java.sql.SQLException;
index 0b3d8de..b58e584 100644 (file)
@@ -17,7 +17,7 @@
  */
 package org.apache.commons.dbcp2.managed;
 
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.ObjectPool;
 import org.apache.commons.dbcp2.PoolingDataSource;
 
 import java.sql.Connection;
index 82a8cc4..17426b2 100644 (file)
@@ -22,7 +22,7 @@ import java.sql.SQLException;
 
 import org.apache.commons.dbcp2.AbandonedConfig;
 import org.apache.commons.dbcp2.PoolableConnection;
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.ObjectPool;
 
 /**
  * PoolableConnection that unregisters from TransactionRegistry on Connection real destroy.
index 5b4e109..e4e68ce 100644 (file)
@@ -22,9 +22,9 @@ import java.util.Collection;
 import org.apache.commons.dbcp2.AbandonedConfig;
 import org.apache.commons.dbcp2.PoolableConnectionFactory;
 import org.apache.commons.dbcp2.PoolingConnection;
-import org.apache.commons.pool.KeyedObjectPool;
-import org.apache.commons.pool.KeyedObjectPoolFactory;
-import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool2.KeyedObjectPool;
+import org.apache.commons.pool2.KeyedObjectPoolFactory;
+import org.apache.commons.pool2.ObjectPool;
 
 /**
  * A {@link PoolableConnectionFactory} that creates {@link PoolableManagedConnection}s.
index a1c0bd1..3dcdeae 100644 (file)
@@ -23,7 +23,7 @@ import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.commons.pool.PoolableObjectFactory;
+import org.apache.commons.pool2.PoolableObjectFactory;
 
 /**
  * TestCase for AbandonedObjectPool
index 3d58ec6..0616d21 100644 (file)
@@ -24,7 +24,7 @@ import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.commons.pool.impl.GenericKeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
 
 /**
  * @author Dirk Verbeeck
index 97b3e65..ddb58b9 100644 (file)
@@ -21,7 +21,7 @@ import java.sql.Connection;
 
 import javax.sql.DataSource;
 
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
index dd7543b..8d2ab07 100644 (file)
@@ -27,10 +27,10 @@ import java.sql.SQLException;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericKeyedObjectPool;
-import org.apache.commons.pool.impl.GenericKeyedObjectPoolFactory;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPoolFactory;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * Tests for a "manually configured", {@link GenericObjectPool}
index f5e7728..58b288b 100644 (file)
@@ -27,10 +27,10 @@ import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.commons.pool.KeyedObjectPoolFactory;
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericKeyedObjectPoolFactory;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.KeyedObjectPoolFactory;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPoolFactory;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * TestSuite for BasicDataSource with prepared statement pooling enabled
index aca174f..6c0d125 100644 (file)
@@ -24,8 +24,8 @@ import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * @author James Ring
index f1fde75..4e170aa 100644 (file)
@@ -23,8 +23,8 @@ import java.util.Properties;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * TestSuite for PoolingDataSource
index d633ab5..dd27e3a 100644 (file)
@@ -28,7 +28,7 @@ import junit.framework.TestSuite;
 
 import org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS;
 
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
  * @version $Revision$ $Date$
index bb69d72..5d489b6 100644 (file)
@@ -28,7 +28,7 @@ import junit.framework.TestSuite;
 
 import org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS;
 
-import org.apache.commons.pool.impl.GenericKeyedObjectPool;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
 
 /**
  * @version $Revision$ $Date$
index 99c3b65..56b99b7 100644 (file)
@@ -26,8 +26,8 @@ import org.apache.commons.dbcp2.PoolableConnectionFactory;
 import org.apache.commons.dbcp2.PoolingDataSource;
 import org.apache.commons.dbcp2.TestConnectionPool;
 import org.apache.commons.dbcp2.TesterDriver;
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.impl.GenericObjectPool;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 
 import javax.transaction.TransactionManager;