lemonzone2010 / javamelody

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

Collecting JDBC / SQL Data #307

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install 1.44 and j-robin 1.5.9
2. Update web.xml for specific app
3. Restart Tomcat 6
4. browse to ../monitoring or /javamelody registered application

What is the expected output? What do you see instead?
I am seeking JDBC and SQL stats

What version of the product are you using? On what application server, JDK,
operating system?
Tomcat 6, JDK 1.6, Win Srv 2008 Std - DATASOURCE iSeries / AS400

Please provide any additional information below.

The application I will monitor for jdbc doesn't use JNDI or other standard 
methods. Inner had a homemade class, that read an external XML with the 
connections parameters like this example

<database
nome="XYZ"
descrizione="DB2/400"
server="10.20.30.40"
connectionC="Provider=MSDASQL.1;DSN=ID400;SYSTEM=|1;DBQ=|2"
connectionJ="driver=com.ibm.as400.access.AS400JDBCDriver\nurl=jdbc:as400://|1;li
braries=|2;naming=sql;prompt=false"
username="user"
password="pass"
</database>

For now, I doesn't monitor and print any graph in JDBC areas, like JDBC 
Connections, and also SQL Info.

What I can do for collect this informations?

Original issue reported on code.google.com by ungru...@gmail.com on 8 May 2013 at 9:27

GoogleCodeExporter commented 9 years ago
Sorry, non standard methods for jdbc are not supported.

The best I can do is to copy the user guide:
If a jdbc driver is used directly without DataSource, 
"net.bull.javamelody.JdbcDriver" should be defined as class of driver (instead 
of com.ibm.as400.access.AS400JDBCDriver in your case) and the jdbc property 
"driver" should be added with the class of the real driver for value 
(com.ibm.as400.access.AS400JDBCDriver in your case).

I am not sure that your non standard method supports jdbc properties.

Original comment by evernat@free.fr on 8 May 2013 at 9:50

GoogleCodeExporter commented 9 years ago
Ok but, where I need to do that? 

Original comment by ungru...@gmail.com on 8 May 2013 at 9:58

GoogleCodeExporter commented 9 years ago
read 
http://docs.oracle.com/javase/7/docs/api/java/sql/DriverManager.html#getConnecti
on%28java.lang.String,%20java.util.Properties%29

Original comment by evernat@free.fr on 8 May 2013 at 10:12

GoogleCodeExporter commented 9 years ago
OK, this meaning modify the app. 

There is no way to do that via an xml configuration like in the documentation?

Original comment by ungru...@gmail.com on 8 May 2013 at 10:31

GoogleCodeExporter commented 9 years ago
No, probably not.

Original comment by evernat@free.fr on 8 May 2013 at 1:18