[JMX] Number of PoolDataSources is different from NumPooledDataSources

View: New views
3 Messages — Rating Filter:   Alert me  

[JMX] Number of PoolDataSources is different from NumPooledDataSources

by stlecho :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

When using JMX to get information about the pooled connections, I've remarked that the number of PoolDataSources shown in "com.mchange.v2.c3po" is the double of the NumPooledDataSources.

When checking the details of each PooledDataSources, I've remarked that for 1 jdbcURL 2 PoolDataSources are shown with a different dataSourceName and identityToken.

Is this normal ?

Example:
  -com.mchange.v2.c3po.C3P0Registry.NumPooledDataSources: 4
  -com.mchange.v2.c3po.C3P0Registry.NumPoolsAllDataSources: 4
  -com.mchange.v2.c3po.PoolDataSources: 8

Regards, Stefan Lecho.



Re: [JMX] Number of PoolDataSources is different from NumPooledDataSources

by stlecho :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There are lots of JMX beans exposed.  We didn't try to write code to navigate them all, we just find the ones we wanted to watch, and then wrote code that looked at the settings on that one, watching for problems.
I understand, but ...

Why is the number of PoolDataSources shown in "com.mchange.v2.c3po" is the double of the NumPooledDataSources ?

Why for each jdbcURL 2 PoolDataSources are shown with a different dataSourceName and identityToken ?

stlecho wrote:
Hi,

When using JMX to get information about the pooled connections, I've remarked that the number of PoolDataSources shown in "com.mchange.v2.c3po" is the double of the NumPooledDataSources.

When checking the details of each PooledDataSources, I've remarked that for 1 jdbcURL 2 PoolDataSources are shown with a different dataSourceName and identityToken.

Is this normal ?

Example:
  -com.mchange.v2.c3po.C3P0Registry.NumPooledDataSources: 4
  -com.mchange.v2.c3po.C3P0Registry.NumPoolsAllDataSources: 4
  -com.mchange.v2.c3po.PoolDataSources: 8

Regards, Stefan Lecho.


Re: [JMX] Number of PoolDataSources is different from NumPooledDataSources

by jdsumsion :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not an expert on how c3p0 does its password-protected pools.  I found the following under "Known Shortcomings" in c3p0 doc:

http://tom.tharrisx.homedns.org/javalib/c3p0-0.8.4.5/doc/#known_shortcomings

stlecho wrote:
There are lots of JMX beans exposed.  We didn't try to write code to navigate them all, we just find the ones we wanted to watch, and then wrote code that looked at the settings on that one, watching for problems.
I understand, but ...

Why is the number of PoolDataSources shown in "com.mchange.v2.c3po" is the double of the NumPooledDataSources ?

Why for each jdbcURL 2 PoolDataSources are shown with a different dataSourceName and identityToken ?