tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1688164 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
Date Mon, 29 Jun 2015 09:22:21 GMT
Author: kfujino
Date: Mon Jun 29 09:22:21 2015
New Revision: 1688164

URL: http://svn.apache.org/r1688164
Log:
In  SlowQueryReportJmx, the LogSlow and logFailed attributes that inherited from SlowQueryReport
are used as a condition of whether JMX notifications are sent.

Modified:
    tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java?rev=1688164&r1=1688163&r2=1688164&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java
Mon Jun 29 09:22:21 2015
@@ -150,7 +150,7 @@ public class SlowQueryReportJmx extends
     @Override
     protected String reportFailedQuery(String query, Object[] args, String name, long start,
Throwable t) {
         query = super.reportFailedQuery(query, args, name, start, t);
-        notifyJmx(query,FAILED_QUERY_NOTIFICATION);
+        if (isLogFailed()) notifyJmx(query,FAILED_QUERY_NOTIFICATION);
         return query;
     }
 
@@ -184,7 +184,7 @@ public class SlowQueryReportJmx extends
     @Override
     protected String reportSlowQuery(String query, Object[] args, String name, long start,
long delta) {
         query = super.reportSlowQuery(query, args, name, start, delta);
-        notifyJmx(query,SLOW_QUERY_NOTIFICATION);
+        if (isLogSlow()) notifyJmx(query,SLOW_QUERY_NOTIFICATION);
         return query;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message