I am using Ehcache 3.2.0 and the Guice 4.1.0 RI of JSR-107.
I am using Java 1.8 on Windows 10.
The caching tags (@CacheResult) are working. My app and my JUnit test show this to be true.
In my unit test I can access the default MBean server and get the caching statistics. This all works.
In my application (running with Tomcat 8), I am using the JConsole app from my JDK to examine the MBeans. They are there (I can see javax.cache and my cache manager) and everything looks like it is working, but I do not see any of the statistics (everything is 0) and the operations (clear) are not working.
Does anybody have any insight into this?
My caches are defined with a ehcache.xml file. When my app runs in Tomcat, I can see in my log files the caching getting setup and everything looks good. And! the caches are working. I can tell this from my debugging sessions. JConsole shows my cache manager and all the caches define in my xml configuration file:
ehcache.xml
------------------
<ehcache:config
xmlns:ehcache="
http://www.ehcache.org/v3"
xmlns:jcache="
http://www.ehcache.org/v3/jsr107"
>
<ehcache:service>
<jcache:defaults enable-management="true" enable-statistics="true"/>
</ehcache:service>
<ehcache:cache alias="DragonStandardFields">
<ehcache:heap unit="entries">1</ehcache:heap>
</ehcache:cache>
</ehcache:config>
---------------------
just no stats and no operations.
I tried to make sure all my code, etc. matches the Ehcache 3.x JSR-107 Provider documentation.
My unit tests which are working use the same code to define my cache manager and set up my caches and I get statistics (values other than 0).
Any ideas?
TIA,
Bob