remove more code not needed
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 11 Dec 2008 03:51:10 +0000 (03:51 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 11 Dec 2008 03:51:10 +0000 (03:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@725565 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java
modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ProxyConnection.java
modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java

index c4eaa99..d9240a2 100644 (file)
@@ -64,6 +64,7 @@ public class ConnectionPool {
     //===============================================================================
     //         INSTANCE/QUICK ACCESS VARIABLE
     //===============================================================================
+    
     /**
      * All the information about the connection pool
      */
index bf32659..f28e95e 100644 (file)
@@ -74,7 +74,7 @@ public abstract class JdbcInterceptor implements InvocationHandler {
      * @param con - the pooled connection
      */
     public abstract void reset(ConnectionPool parent, PooledConnection con);
-
+    
     public List<InterceptorProperty> getProperties() {
         return properties;
     }
index 8d14279..a3094da 100644 (file)
@@ -84,7 +84,7 @@ public class ProxyConnection extends JdbcInterceptor {
         if (isClosed()) throw new SQLException("Connection has already been closed.");
         return method.invoke(connection.getConnection(),args);
     }
-
+    
     public boolean isClosed() {
         return connection==null || connection.isDiscarded();
     }
index 15357b7..495ffb4 100644 (file)
@@ -53,8 +53,8 @@ public class SlowQueryReport extends AbstractCreateStatementInterceptor  {
     /**
      * we will be keeping track of query stats on a per pool basis, do we want this, or global?
      */
-    protected static IdentityHashMap<ConnectionPool,HashMap<String,QueryStats>> perPoolStats = 
-        new IdentityHashMap<ConnectionPool,HashMap<String,QueryStats>>();
+    protected static HashMap<String,HashMap<String,QueryStats>> perPoolStats = 
+        new HashMap<String,HashMap<String,QueryStats>>();
     /**
      * the queries that are used for this interceptor.
      */
@@ -69,11 +69,6 @@ public class SlowQueryReport extends AbstractCreateStatementInterceptor  {
     protected int  maxQueries= 1000; //don't store more than this amount of queries
     
     /**
-     * The pool that is associated with this interceptor so that we can clean up
-     */
-    private ConnectionPool pool = null;
-
-    /**
      * Returns the query stats for a given pool
      * @param pool - the pool we want to retrieve stats for
      * @return a hash map containing statistics for 0 to maxQueries 
@@ -115,8 +110,6 @@ public class SlowQueryReport extends AbstractCreateStatementInterceptor  {
     public void closeInvoked() {
         try {
             queries = null;
-            finalize();
-            pool = null;
         }catch (Exception x) {
             log.debug(x);
         }
@@ -190,14 +183,10 @@ public class SlowQueryReport extends AbstractCreateStatementInterceptor  {
                 }
 
             };
-            perPoolStats.put(parent, queries);
+            perPoolStats.put(parent.getName(), queries);
         }
-        this.pool = parent;
     }
     
-    public void finalize() {
-    }
-
     public CompositeData[] getSlowQueriesCD() {
         return null;
     }