5.4.3. JBoss Cache Statistics

JBoss Cache captures statistics in its interceptors and various other components, and exposes these statistics through a set of MBeans. Gathering of statistics is enabled by default; this can be disabled for a specific cache instance through the Configuration.setExposeManagementStatistics() setter. Note that the majority of the statistics are provided by the CacheMgmtInterceptor, so this MBean is the most significant in this regard. If you want to disable all statistics for performance reasons, you set Configuration.setExposeManagementStatistics(false) and this will prevent the CacheMgmtInterceptor from being included in the cache's interceptor stack when the cache is started.
If a CacheJmxWrapper is registered with JMX, the wrapper also ensures that an MBean is registered in JMX for each interceptor and component that exposes statistics.

Note

Note that if the CacheJmxWrapper is not registered in JMX, the interceptor MBeans will not be registered either. The JBoss Cache 1.4 releases included code that would try to "discover" an MBeanServer and automatically register the interceptor MBeans with it. For JBoss Cache 2.x we decided that this sort of "discovery" of the JMX environment was beyond the proper scope of a caching library, so we removed this functionality.
. Management tools can then access those MBeans to examine the statistics. See the section in the Section 13.1, “JBoss Cache Statistics” pertaining to the statistics that are made available via JMX.