#48 Refactor JMX ObjectNames

open
nobody
None
7
2011-05-17
2011-05-17
No

The existing ObjectNames being constructed by C3P0 are atrocious.

It would appear that the reason for concatenating the identityToken into the object name testifies to a lack of understanding of ObjectNames, and how they can be constructed to contain multiple parameters.

I am attaching a patch which changes the behavior of C3P0's mbean registration to create slightly more-meaningful JMX ObjectNames. These names include the keys, "identityToken=<token>,name=<dataSourceName>" which will let us identify the dataSourceName and identityToken of registered pools as well as query for specific pools.

I use collectd (http://www.collectd.org) and it's JMX connector to grab system telemetry. In order to properly distinguish between pools in JMX and trend telemetry across instances, servers, restarts, etc. I need a stable identifier (dataSourceName) in the JMX ObjectName.

This patch accomplishes that.

Attached is a diff which greatly improves the JMX publishing of PooledDataSources, and a screen-shot showing the difference in jconsole. I may attach screenshots of the collectd graphs once I promote my custom c3p0 build to my test environment.

Discussion

  • Bryan Varner

    Bryan Varner - 2011-05-17
    • priority: 5 --> 7
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks