tranjith / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

add query/SQL statistics for tomcat jdbc-pool without javamelody proxy DataSource #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the only way to get SQL statistics (get the top-10 of slow queries 
etc.) is using a special proxy DataSource/Driver 
("net.bull.javamelody.JdbcDriver").

With the consequence that every jdbc action is routed through the javamelody 
jdbc driver.

Maybe I am bit conservative but this frightens me, because the successful 
operation of my application totally depends on the javamelody jdbc driver.

How about an alternative to the proxy DataSource?
At least jdbc pool offers at least three ways to hook into the pool to get all 
the information required, with a less invasive manner:

1. Either to connect to a JMX bean to receive notifications
2. To implement an AbstractQueryReport ( 
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/intercep
tor/AbstractQueryReport.html )
3. To implement a JdbcInterceptor ( 
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/JdbcInte
rceptor.html )

Original issue reported on code.google.com by mineral_...@gmx.de on 7 May 2012 at 4:41

GoogleCodeExporter commented 9 years ago

Original comment by evernat@free.fr on 8 May 2012 at 9:34

GoogleCodeExporter commented 9 years ago
some documentation: 
http://www.tomcatexpert.com/blog/2012/01/24/using-tomcat-7-jdbc-connection-pool-
production

Original comment by evernat@free.fr on 26 May 2012 at 9:06