cachingProvider.getCacheManager()
Allows my service to access the cache via:
cacheBean.getCacheManager().getCache("testCache")
This is obviously using the classloader to get ehcache.xml and everything
works as expected. Since I do not want to have my configuration compiled
into the classpath I used:
cachingProvider.getCacheManager(new
File("src/main/resources/ehcache.xml").toURI(),
cachingProvider.getDefaultClassLoader())
The cache appears to work since if I send the same key it is not logged as
being added in the method, but I can no longer access that cache. I suspect
another empty cache is being created since I do not get a NPE, but 0 items
in the cache using:
cacheBean.getCacheManager().getCache("testCache")
I'm going to profile using both forms of getCacheManager and verify that,
but this whole cache scoping thing worries me. Is it provider specific or is
this normal behavior?
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/JCache-cache-manager-configuration-file-tp4676052.html
Sent from the TomEE Users mailing list archive at Nabble.com.