commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r746629 - in /commons/proper/dbcp/trunk: src/java/org/apache/commons/dbcp/DelegatingConnection.java xdocs/changes.xml
Date Sun, 22 Feb 2009 03:35:00 GMT
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>



Mime
View raw message