How to access database statistics in a custom load metric class in JBoss EAP 6?

Solution Unverified - Updated -

Issue

  • There is a custom mod_cluster Load Metric as mentioned here and I want to access things like the JDBC connection pool statistics, etc. In the CLI I can do it like this:
/subsystem=datasources/data-source=NAME/statistics=pool/:read-attribute(name=InUseCount)

for example, but how do I access these information in my Metric Java class?

  • We get "InstanceNotFoundException" because the metrics are executed before all subsystems are loaded. How to implement this?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.