So if I specify jcache.ccf in classpath, then technically it should show up via getCacheNames? It doesn't appear to pick it up from src/main/resources/jcache.ccf. On Fri, Sep 4, 2015 at 1:17 PM, Romain Manni-Bucau wrote: > Think it does but maybe it takes another one. About getCacheNames it is > only *created* caches ie the one jcache saw and not the ones jcs has. > Le 4 sept. 2015 19:14, "Steve Goldsmith" a écrit : > > > Looking at org.apache.commons.jcs.jcache.JCSCachingProvider it doesn't > > appear to search classpath? Do you have to explicitly specify path in > > getCacheManager call? > > > > On Fri, Sep 4, 2015 at 2:40 AM, Romain Manni-Bucau < > rmannibucau@gmail.com> > > wrote: > > > > > Hi, > > > > > > final CachingProvider cachingProvider = Caching.getCachingProvider(); > > > final CacheManager cacheManager = cachingProvider.getCacheManager(); > > > cacheManager.createCache("c1", new MutableConfiguration > String>()); > > > cacheManager.createCache("c2", new MutableConfiguration > String>()); > > > final Collection actualNames = new ArrayList(2); > > > for (final String s : cacheManager.getCacheNames()) > > > { > > > actualNames.add(s); > > > } > > > assertEquals(2, actualNames.size()); > > > assertEquals(new HashSet(asList("c1", "c2")), new > > > HashSet(actualNames)); > > > cachingProvider.close(); > > > > > > works fine so you have a setup issue somewhere - or you dont use the > > > same cache manager. > > > > > > > > > > > > Romain Manni-Bucau > > > @rmannibucau | Blog > > > | Github < > > > https://github.com/rmannibucau> | > > > LinkedIn | Tomitriber > > > > > > > > > 2015-09-04 3:52 GMT+02:00 sgjava : > > > > > > > getCacheManager().getCacheNames() is not working with JCS. I get an > > empty > > > > org.apache.commons.jcs.jcache.ImmutableIterable. The Ehcache provider > > > > correctly returns a String iterator with the cache names. My tests > run > > > > fine, > > > > but this is a good way to check that your configuration is picked up > > with > > > > multiple caches defined. > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > > > > > > > > http://tomee-openejb.979440.n4.nabble.com/commons-jcs-jcach-getCacheNames-not-working-tp4676111.html > > > > Sent from the TomEE Users mailing list archive at Nabble.com. > > > > > > > > > > > > > > > -- > > Steven P. Goldsmith > > > -- Steven P. Goldsmith