lemonzone2010 / javamelody

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

Unable to monitor SQL Statistics for my application #408

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.I have copied javamelody.jar and jrobin-x.jar to the WEB-INF/lib directory of 
the war of the webapp.

2.Added the following details in the "WEB>XML"

<filter>
                <filter-name>monitoring</filter-name>
                <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
        </filter>
        <filter-mapping>
                <filter-name>monitoring</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>
        <listener>
                <listener-class>net.bull.javamelody.SessionListener</listener-class>
        </listener>

What is the expected output? What do you see instead?

I am unable to see the SQL Statistics. Its showing as none.

What version of the product are you using? On what application server, JDK,
operating system?

I am using Apache Tomcat as the Application server.Other Details are shown in 
the Attached file.

Please provide any additional information below.

We are using Bourne CP Connection Pooling. 

Original issue reported on code.google.com by vimalnai...@gmail.com on 20 May 2014 at 1:05

Attachments:

GoogleCodeExporter commented 9 years ago
Do you use a jdbc datasource from JNDI to connect to the database, or direct 
jdbc connections using "Bourne CP Connection Pooling"?
If you use a jdbc datasource, what is the JNDI lookup name of the datasource?
If you use direct jdbc connections, do you have correctly configured 
net.bull.javamelody.JdbcDriver as said in the user guide?

Original comment by evernat@free.fr on 20 May 2014 at 2:27

GoogleCodeExporter commented 9 years ago
By the way, using PermSize=12G, MaxPermSize=24G is a complete waste of memory, 
and Xmx=24G probably too.

Original comment by evernat@free.fr on 20 May 2014 at 2:32

GoogleCodeExporter commented 9 years ago
We are using "Bourne CP Connection Pooling" . I have n't done the 
net.bull.javamelody.JdbcDriver configuration as I am not using Hibernate nor 
Spring framework.

Original comment by vimalnai...@gmail.com on 20 May 2014 at 2:44

GoogleCodeExporter commented 9 years ago
The user guide clearly says:
If a jdbc driver is used directly without DataSource,
1. "net.bull.javamelody.JdbcDriver" should be defined as class of driver
2. and the jdbc property "driver" should be added with the class of the real 
driver for value.

Original comment by evernat@free.fr on 20 May 2014 at 2:50

GoogleCodeExporter commented 9 years ago
But as per the user guide, the information mentioned is regarding Hibernate and 
Spring Framework. My application is following neither of these. Its just using 
Bourne CP Connection Pooling for its JDBC connections. Can you please provide 
some clarity regarding net.bull.javamelody.JdbcDriver, where exactly should 
this be updated?

Original comment by vimalnai...@gmail.com on 20 May 2014 at 5:00

GoogleCodeExporter commented 9 years ago
For direct jdbc connections, the user guide says:
If a jdbc driver is used directly without DataSource,
1. "net.bull.javamelody.JdbcDriver" should be defined as class of driver
2. and the jdbc property "driver" should be added with the class of the real 
driver for value.
For information, a jdbc properties in the java api is the second parameter in 
this method:
http://docs.oracle.com/javase/8/docs/api/java/sql/DriverManager.html#getConnecti
on-java.lang.String-java.util.Properties-

The user guide also gives examples for hibernate and spring.
But the user guide may not give examples for every connection pools and 
applications in the world, and in particular not for a "Bourne CP Connection 
Pool", which you probably have mistaken with another. So, as of today, you need 
to understand that above and you need to read the documentation for your 
connection pool.

In fact, you may not find how to do that and your "Bourne CP" choice is 
probably more complex than a jdbc datasource from JNDI. But like often, "Simple 
things should be simple, complex things should be possible".

I am not here to explain how to use the "Bourne CP Connection Pool", so this 
issue is invalid.

Original comment by evernat@free.fr on 20 May 2014 at 6:06

GoogleCodeExporter commented 9 years ago
Did you see that wasting so much "memories" (24 G + 24 G), is quite fun when 
using a "[Jason] Bourne" connection pool?

Original comment by evernat@free.fr on 20 May 2014 at 10:30