lanxy88 / javamelody

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

Is org.apache.tomcat.jdbc.pool.DataSource or datasource defined in java:comp/env/myDataSource supported in JavaMelody ? #417

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a datasource of type org.apache.tomcat.jdbc.pool.DataSource in 
<Resource> in server.xml for Tomcat
2. The datasource JNDI is something like java:/comp/env/myDS
3. Set the system property Djavamelody.rewrap-datasources=true

I did check the code for net.bull.javamelody.JdbcWrapper.rewrapDataSource() but 
there is no logic for org.apache.tomcat.jdbc.pool.DataSource. Any plans for 
supporting "org.apache.tomcat.jdbc.pool.DataSource" in near feature ?

What is the expected output? What do you see instead?
I see the log message  
DEBUG     Datasource needs rewrap: java:comp/env/myDataSource of class 
org.apache.tomcat.jdbc.pool.DataSource

But No SQL Statistics, need to see SQL Statistics

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

Using javamelody 1.51.0 version, Tomcat 7.0.54

Please provide any additional information below.

Original issue reported on code.google.com by ashokthe...@gmail.com on 9 Jul 2014 at 7:25

GoogleCodeExporter commented 9 years ago
In general, the JNDI name of a jdbc datasource is java:/comp/env/jdbc/myDS, not 
java:/comp/env/myDS
But given the log, it seems that you have also used the javamelody.datasources 
parameter.

The rewrap-datasources is not documented and not supported. So this an 
enhancement and not a bug.

There is no plan to support rewrap of org.apache.tomcat.jdbc.pool.DataSource, 
unless you do it. Make a change, test it, then submit a patch: 
https://code.google.com/p/javamelody/wiki/DevGuide
Do you want to do that?

Original comment by evernat@free.fr on 11 Jul 2014 at 1:58

GoogleCodeExporter commented 9 years ago
Are you there?

Original comment by evernat@free.fr on 19 Jul 2014 at 12:12

GoogleCodeExporter commented 9 years ago
yes, i am trying to fix the issue and submit a patch.

Original comment by ashokthe...@gmail.com on 21 Jul 2014 at 7:05

GoogleCodeExporter commented 9 years ago
ok, thanks

Original comment by evernat@free.fr on 21 Jul 2014 at 7:59