Hide Forgot
Description of problem: Its not possible to see cache statistics of configured JCache caches through JMX. Initially I thought its due to missing statistics="true" attribute in ehcache.xml. But it isn't the case. It seems that when using cache directly via CacheManager.getInstance().getCache, the statistics are published via JMX. However, when using caches through JCache interface, the statistics are not published via JMX. Nontheless they are collected. This can be proved by the following code snippet net.sf.ehcache.Cache unwrapped = (net.sf.ehcache.Cache) c.unwrap(net.sf.ehcache.Cache.class); long size = unwrapped.getStatistics().getLocalHeapSize(); Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Deploy Candlepin with config: cache.jmx.statistics=true 2. Run buildr rspec:owner_resource_spec 3. Check JConsole statistics Actual results: All the statistics are 0 Expected results: Statistics show non-zero values Additional info: