Dear Daniel,

Thanks for your reply.
My Tomcat version is 7.0.35. It is under CentOS 5.8.

My datasource config is:
<Resource name="jdbc/xxx" auth="Container" driverClassName="org.postgresql.Driver" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" initialSize="1" maxIdle="20" maxActive="20" maxWait="5000" password="xxx" type="javax.sql.DataSource" url="jdbc:postgresql://10.3.76.41/xxx" username="xxx" validationQuery="select 1" jdbcInterceptors="ConnectionState;SlowQueryReportJmx(threshold=1000)" testOnBorrow="true"/>

There is my java code:
Map<String, SlowQueryReportJmx.QueryStats> map = SlowQueryReportJmx.getPoolStats("java:comp/env/jdbc/" + poolName);

I tried the config with jdbcInterceptors="ConnectionState;SlowQueryReport(threshold=1000)",
but there is no messages in the Tomcat log files.

Thanks,
      Ferenc

2013.06.04. 16:20 keltezéssel, Daniel Mikusa írta:
On Jun 4, 2013, at 6:26 AM, Lutischán Ferenc <lutisch...@gmail.com> wrote:

Dear Users,

Please help to me:
How to get SlowQueryReport statistics?
Usually these are logged as WARN messages.  Unless you use SlowQueryReportJmx 
and then they are logged and sent as JMX notifications.

I tried:

Map<String,SlowQueryReport.QueryStats> map = 
SlowQueryReport.getPoolStats("java:comp/env/jdbc/xxx");
and
Map<String,SlowQueryReport.QueryStats> map = 
SlowQueryReport.getPoolStats("xxx");

The result in both case was a null map.
Can you elaborate on what you are trying to do here?

Are you using Tomcat?

If so…
   1.) What version are you using?
   2.) How do you have your data source configured?  Please include the 
resource tag.

If not…
   1.) Are you using the Tomcat's jdbc-pool directly?
   2.) How are you setting it up?
   3.) How is it configured?
   4.) What version are you using?

Dan


Thanks,
       Ferenc

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Reply via email to