View Full Version : Support for c3po Connection Pools
Hi,
Does Java-Monitoring supports c3po-based Connection Pools ?
Regards, Stefan Lecho.
kjkoster
28-01-2009, 22:23
Dear Stefan,
I have not tested that yet. Java-monitor makes use of the MBeans that Tomcat registers for each data source that you declare in Tomcat's configuration files.
Note that if you declare your own data sources in (say) a Spring container inside the application, Java-monitor currently does not pick up on them.
Where have you declared your data sources?
Kees Jan
PS. You could just start using Java-monitor and see if it picks up on them. :)
Hi Kees Jan,
Our data sources are decalred in the Spring container inside our application. I've installed the Probe and does not see information on the Connection Pools nor on the Hibernate Sessions.
Regards, Stefan Lecho.
kjkoster
29-01-2009, 21:37
Dear Stefan,
Yeah, I was afraid that was the case. Does Spring register mbeans for these data sources? Are they registered in your application's JNDI directory?
Kees Jan
I have no idea if Spring registers mbeans for these data sources but I am pretty sure that Spring does not register the data sources in a JNDI directory.
kjkoster
02-02-2009, 20:20
Dear Stefan,
Well, I read that c3p0 actually supports mbeans itself. Perhaps you could hook up JConsole to your application and see if you can find the mbeans?
If you provide me with that information, I will be happy to add support for them to Java-monitor.com.
Kees Jan
kjkoster
02-02-2009, 20:49
Actually, I just checked. C3p0 registers JMX MBeans itself (http://amemon.wordpress.com/2007/07/15/monitoring-c3p0-using-jmxjconsole/). Woot! They are registered under object name com.mchange.v2.c3p0:type=PooledDataSource,*.
It does have a truckload of attributes, though. Which ones should we be using?
Kees Jan
What kind of information do you typically show when showing information on Connection Pools registered in JNDI ?
kjkoster
02-02-2009, 22:28
Dear Stefan,
Java-monitor does not look into the JNDI directory. It's just one of the (many, many) things we could start doing. For now, we'd like to stick to mbeans.
As for what to monitor: we now track the configured upper limit of the pool, the current number of allocated connections and the current number of busy connections. Which attributes on the C3P0 data sources would we need to pick up on to see this?
I'm thinking of redoing some of this, since pools tend to be really two pools (idle and busy), each with their own fill levels. In the current scheme this is not precisely shown. The current display is a good approximation and will show issues if you have them. It just does not allow you to tune the last 5% out of your data source levels.
What do you think we should monitor of the C3P0 data sources?
Kees Jan
Following links contain useful information:
http://www.mchange.com/projects/c3p0/index.html#basic_pool_configuration
http://www.mchange.com/projects/c3p0/index.html#configuring_statement_pooling
Dear Stefan,
Well, I read that c3p0 actually supports mbeans itself. Perhaps you could hook up JConsole to your application and see if you can find the mbeans?
If you provide me with that information, I will be happy to add support for them to Java-monitor.com.
Kees Jan
hi,
can you let me know the complete steps to integrate c3p0 and jconsole.
i tried the following but couldn't see the c3p0 in the mbeans tab
jconsole -J-Djava.class.path=%JAVA_HOME%/lib/jconsole.jar;
%JAVA_HOME%/lib/tools.jar;c3p0-0.9.1.1.jar
This is quite urgent.pl.help
regards
a.suhasini
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.