commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandy...@apache.org
Subject svn commit: r384536 - /jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnection.java
Date Thu, 09 Mar 2006 15:42:25 GMT
Author: sandymac
Date: Thu Mar  9 07:42:23 2006
New Revision: 384536

URL: http://svn.apache.org/viewcvs?rev=384536&view=rev
Log:
Document future changes that should be made in a non-point release.

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

Modified: jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnection.java?rev=384536&r1=384535&r2=384536&view=diff
==============================================================================
--- jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnection.java
(original)
+++ jakarta/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnection.java
Thu Mar  9 07:42:23 2006
@@ -32,6 +32,7 @@
  */
 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;
 
     /**
@@ -67,7 +68,7 @@
             isClosed = isClosed();
         } catch (SQLException e) {
             try {
-                _pool.invalidateObject(this);
+                _pool.invalidateObject(this); // XXX should be guarded to happen at most
once
             } catch (Exception ie) {
                 // DO NOTHING the original exception will be rethrown
             }
@@ -75,14 +76,14 @@
         }
         if (isClosed) {
             try {
-                _pool.invalidateObject(this);
+                _pool.invalidateObject(this); // XXX should be guarded to happen at most
once
             } catch (Exception ie) {
                 // DO NOTHING, "Already closed" exception thrown below
             }
             throw new SQLException("Already closed.");
         } else {
             try {
-                _pool.returnObject(this);
+                _pool.returnObject(this); // XXX should be guarded to happen at most once
             } catch(SQLException e) {
                 throw e;
             } catch(RuntimeException e) {



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


Mime
View raw message