You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2009/02/22 04:35:00 UTC

svn commit: r746629 - in /commons/proper/dbcp/trunk: src/java/org/apache/commons/dbcp/DelegatingConnection.java xdocs/changes.xml

Author: psteitz
Date: Sun Feb 22 03:34:59 2009
New Revision: 746629

URL: http://svn.apache.org/viewvc?rev=746629&view=rev
Log:
Reverted DelegatingConnection#close to 1.2.2 version to ensure open statements are closed before the underlying connection is closed. JIRA: DBCP-242

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java
    commons/proper/dbcp/trunk/xdocs/changes.xml

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java?rev=746629&r1=746628&r2=746629&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java Sun Feb 22 03:34:59 2009
@@ -238,11 +238,8 @@
      * any Statements that were not explicitly closed.
      */
     public void close() throws SQLException {
-        try {
-            _conn.close();
-        } finally {
-            _closed = true;
-        }
+        passivate();
+        _conn.close();
     }
 
     protected void handleException(SQLException e) throws SQLException {

Modified: commons/proper/dbcp/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/xdocs/changes.xml?rev=746629&r1=746628&r2=746629&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/xdocs/changes.xml (original)
+++ commons/proper/dbcp/trunk/xdocs/changes.xml Sun Feb 22 03:34:59 2009
@@ -42,6 +42,10 @@
      new features as well as bug fixes and instrumentation.  Some bug fixes
      will change semantics (e.g. connection close will become idempotent).
      The minimum JDK level will be increased to 1.4">
+      <action dev="psteitz" type="fix" issue="DBCP-242">
+        Reverted DelegatingConnection close to 1.2.2 version to ensure
+        open statements are closed before the underlying connection is closed.
+      </action>
       <action dev="markt" type="fix">
         Add some test cases that were missing from the TestAll test suite.
       </action>