I used:

    @Inject
    public JCacheResolverFactory(final CacheBean cacheBean) {
        cacheManager = cacheBean.getCacheManager();
    }

Then it can share the same CacheManager from the CacheBean:

    @PostConstruct
    public void init() {
        cachingProvider = Caching.getCachingProvider();
        cacheManager = cachingProvider.getCacheManager(new File(
                "src/config/ehcache.xml").toURI(), CacheBean.class.
                getClassLoader());
    }




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Getting-CacheManager-from-CacheResolverFactory-tp4676849p4676851.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to