Author: markt
Date: Tue Dec  3 18:45:20 2013
New Revision: 1547523

URL: http://svn.apache.org/r1547523
Log:
Clean up comments.
Remove unnecessary code.

Modified:
    
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/managed/ManagedConnection.java

Modified: 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/managed/ManagedConnection.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/managed/ManagedConnection.java?rev=1547523&r1=1547522&r2=1547523&view=diff
==============================================================================
--- 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/managed/ManagedConnection.java
 (original)
+++ 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/managed/ManagedConnection.java
 Tue Dec  3 18:45:20 2013
@@ -153,8 +153,8 @@ public class ManagedConnection extends D
     }
 
     /**
-     * Delegates to {@link ManagedConnection#transactionComplete()} 
-     * for transaction completion events. 
+     * Delegates to {@link ManagedConnection#transactionComplete()}
+     * for transaction completion events.
      */
     protected class CompletionListener implements TransactionContextListener {
         public void afterCompletion(TransactionContext completedContext, 
boolean commited) {
@@ -167,34 +167,32 @@ public class ManagedConnection extends D
     protected void transactionComplete() {
         transactionContext = null;
 
-        // if we were using a shared connection, clear the reference now that 
the transaction has completed
+        // If we were using a shared connection, clear the reference now that
+        // the transaction has completed
         if (isSharedConnection) {
             // for now, just set the delegate to null, it will be created 
later if needed
             setDelegate(null);
             isSharedConnection = false;
         }
 
-        // if this connection was closed during the transaction and there is 
still a delegate present close it
+        // If this connection was closed during the transaction and there is
+        // still a delegate present close it
         Connection delegate = getDelegateInternal();
         if (_closed && delegate != null) {
             try {
                 setDelegate(null);
 
-                // don't actually close the connection if in a transaction
                 if (!delegate.isClosed()) {
                     // don't use super.close() because it calls passivate() 
which marks the
                     // the connection as closed without returning it to the 
pool
                     delegate.close();
                 }
             } catch (SQLException ignored) {
-                // not a whole lot we can do here as connection is closed
+                // Not a whole lot we can do here as connection is closed
                 // and this is a transaction callback so there is no
                 // way to report the error
-            } finally {
-                _closed = true;
             }
         }
-
     }
 
     //


Reply via email to