Finally, JMX publish the metric MaxUsedCound if statistics is enabled, this is the metric needed. In Jboss EAP 6.1, statistics were disabled by default. So you must specifically enable them, which you must be doing after the server has started as you need to use statistics-enabled="true" in your datasource config. Enabling it via CLI in EAP 6.1 doesn't persist the change.
Statistics are only gathered after the statistics have been enabled. So if you are enabling it after the server has started it may show a slightly odd picture.
Perhaps It is suggested that you need to add the * statistics-enabled="true" * attribute to your datasource configuration, restart, and check the datasource statistics again.
You can enable *statistics enabled* attribute by using the following CLI command:
After adding the attribute: *statistics-enabled="true" * in your datasource configuration., You can run the below CLI command to check datasource statistics: