Make sure it compiles with JDK1.5, this is one of the times you wish you had preproce...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 16 Nov 2008 03:41:42 +0000 (03:41 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 16 Nov 2008 03:41:42 +0000 (03:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@717974 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/build.xml
modules/jdbc-pool/doc/changelog.xml
modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java

index 2bab6e3..0101097 100644 (file)
     <delete file="${base.path}/file.tar"/>
     <delete file="${base.path}/file.tar.gz"/>
   </target>
+  <target name="f">
+    <echoproperties/>
+  </target>
 </project>
index 861d693..8b01dbf 100644 (file)
@@ -31,6 +31,7 @@
 <section name="Tomcat JDBC Connection Pool v1.0.2-beta">
   <subsection name="pool">
     <changelog>
+      <update><rev>717972</rev>Added an interceptor that will clean up non closed statements when a connection is returned to the pool. (<code>org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer</code>)</update>
       <update><rev>713763</rev>Improve connection state handling</update>
       <fix><bug></bug> <rev>713763</rev>Improve connection state handling</fix>
     </changelog>
index 30447f0..ccee34d 100644 (file)
@@ -51,9 +51,7 @@ public class StatementFinalizer extends AbstractCreateStatementInterceptor {
             Statement st = ws.get();
             if (st!=null) {
                 try {
-                    if (!st.isClosed()) {
-                        st.close();
-                    }
+                    st.close();
                 } catch (Exception ignore) {
                     if (log.isDebugEnabled()) {
                         log.debug("Unable to closed statement upon connection close.",ignore);
@@ -62,5 +60,4 @@ public class StatementFinalizer extends AbstractCreateStatementInterceptor {
             }
         }
     }
-
 }