We use JBoss EAP 6.3.3 as the application server to run our Java applications. All JMX Metrics (Threads, Sessions, etc.) are correctly displayed except the database metrics. All of them are reporting zero values (for example availableCount, inUse) and do not change during testing.
The problem was not showing in JBoss EAP 6.2.x
We can also notice that if using other tools to view the JMX data, the values also report as zero.
This is a screenshot showing the output in Introscope and JVisualVM:
<Please see attached file for image>
JBoss EAP 6.3.3 running in Java 7 with a 9.5.5 Java Agent, JBoss EAP running in standalone mode
Contact was made with Red Hat and they indicated that the reporting of statistics for datasources is disabled by default in JBoss EAP 6.3.
Note: This requires a configuration change to JBoss. So if you have any questions about the impact of the change, please contact Red Hat.
1. Locate JBOSS_HOME, i.e. JBOSS_HOME as the directory that has a subdirectory of bin that contains the standalone.bat/sh script.
2. Go to JBOSS_HOME/docs/schema and locate jboss-as-datasources_1_2.xsd.
3. Search for the term 'statistics-enabled' in the .xsd document, you will find one entry like this:
<xs:attribute default="false" name="statistics-enabled" type="xs:boolean">
4. Change the value false to true and save the file.
5. Restart JBoss and you should now see actual values reported for these datasource metrics in Introscope, assuming that the datasources are being used.
Release: CEMUGD00200-9.7-Introscope to CA Application-Performance Management-Upgrade Main