commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1152966 - in /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2: PoolableConnection.java PoolableConnectionFactory.java
Date Mon, 01 Aug 2011 22:57:24 GMT
Author: markt
Date: Mon Aug  1 22:57:23 2011
New Revision: 1152966

URL: http://svn.apache.org/viewvc?rev=1152966&view=rev
Log:
Generics

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnection.java
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnection.java?rev=1152966&r1=1152965&r2=1152966&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnection.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnection.java Mon
Aug  1 22:57:23 2011
@@ -34,14 +34,15 @@ import org.apache.commons.pool2.ObjectPo
 public class PoolableConnection extends DelegatingConnection {
     /** The pool to which I should return. */
     // TODO: Correct use of the pool requires that this connection is only every returned
to the pool once.
-    protected ObjectPool _pool = null;
+    protected ObjectPool<PoolableConnection> _pool = null;
 
     /**
      *
      * @param conn my underlying connection
      * @param pool the pool to which I should return when closed
      */
-    public PoolableConnection(Connection conn, ObjectPool pool) {
+    public PoolableConnection(Connection conn,
+            ObjectPool<PoolableConnection> pool) {
         super(conn);
         _pool = pool;
     }
@@ -52,7 +53,8 @@ public class PoolableConnection extends 
      * @param pool the pool to which I should return when closed
      * @param config the abandoned configuration settings
      */
-    public PoolableConnection(Connection conn, ObjectPool pool, AbandonedConfig config) {
+    public PoolableConnection(Connection conn,
+            ObjectPool<PoolableConnection> pool, AbandonedConfig config) {
         super(conn, config);
         _pool = pool;
     }

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java?rev=1152966&r1=1152965&r2=1152966&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
Mon Aug  1 22:57:23 2011
@@ -97,7 +97,7 @@ public class PoolableConnectionFactory
      * Sets the {@link ObjectPool} in which to pool {@link Connection}s.
      * @param pool the {@link ObjectPool} in which to pool those {@link Connection}s
      */
-    synchronized public void setPool(ObjectPool<Connection> pool) {
+    synchronized public void setPool(ObjectPool<PoolableConnection> pool) {
         if(null != _pool && pool != _pool) {
             try {
                 _pool.close();
@@ -112,7 +112,7 @@ public class PoolableConnectionFactory
      * Returns the {@link ObjectPool} in which {@link Connection}s are pooled.
      * @return the connection pool
      */
-    public synchronized ObjectPool<Connection> getPool() {
+    public synchronized ObjectPool<PoolableConnection> getPool() {
         return _pool;
     }
 
@@ -312,7 +312,7 @@ public class PoolableConnectionFactory
     protected volatile String _validationQuery = null;
     protected volatile int _validationQueryTimeout = -1;
     protected Collection<String> _connectionInitSqls = null;
-    protected volatile ObjectPool<Connection> _pool = null;
+    protected volatile ObjectPool<PoolableConnection> _pool = null;
     protected Boolean _defaultReadOnly = null;
     protected boolean _defaultAutoCommit = true;
     protected int _defaultTransactionIsolation = UNKNOWN_TRANSACTIONISOLATION;



Mime
View raw message