OK, I tried the snapshot again and it still creates a default cache trying:
@PostConstruct
public void init() {
log.info("PostConstruct");
cachingProvider = Caching.getCachingProvider();
//cacheManager = cachingProvider.getCacheManager();
log.info("getCacheManager");
cacheManager = cachingProvider.getCacheManager(new File(
"src/main/resources/jcache.ccf").toURI(),
Thread.currentThread().getContextClassLoader(),
cachingProvider.
getDefaultProperties());
}
It still creates a default cache after calling getCacheManager:
Sep 15, 2015 1:49:06 PM com.codeferm.jcache.tomee.CacheBean init
*INFO: PostConstruct*
Sep 15, 2015 1:49:06 PM com.codeferm.jcache.tomee.CacheBean init
*INFO: getCacheManager*
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.utils.threadpool.ThreadPoolManager loadConfig
INFO: thread_pool.default PoolConfiguration = useBoundary = [true]
boundarySize = [2000] maximumPoolSize = [150] minimumPoolSize = [4]
keepAliveTime = [300000] whenBlockedPolicy = [RUN] startUpSize = [4]
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator
setDefaultAuxValues
INFO: Setting default auxiliaries to null
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator
parseCompositeCacheAttributes
INFO: No special CompositeCacheAttributes class defined for key
[jcs.default.cacheattributes], using default class.
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator
setDefaultCompositeCacheAttributes
INFO: setting defaultCompositeCacheAttributes to [ useLateral = true,
useRemote = true, useDisk = true, maxObjs = 100, maxSpoolPerRun = -1,
diskUsagePattern = SWAP, spoolChunkSize = 2 ]
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator
parseElementAttributes
INFO: No special ElementAttribute class defined for key
[jcs.default.elementattributes], using default class.
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator
setDefaultElementAttributes
INFO: setting defaultElementAttributes to [ IS_LATERAL = true, IS_SPOOL =
true, IS_REMOTE = true, IS_ETERNAL = true, MaxLifeSeconds = -1, IdleTime =
-1, CreateTime = 1442339346194, LastAccessTime = 1442339346194,
getTimeToLiveSeconds() = -1, createTime = 1442339346194 ]
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache
initialize
INFO: initialized MemoryCache for testCache
Sep 15, 2015 1:49:06 PM org.apache.commons.jcs.engine.control.CompositeCache
<init>
INFO: Constructed cache with name [testCache] and cache attributes [
useLateral = true, useRemote = true, useDisk = true, maxObjs = 200001,
maxSpoolPerRun = -1, diskUsagePattern = SWAP, spoolChunkSize = 2 ]
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator
parseAuxiliary
SEVERE: Could not instantiate auxFactory named "DC".
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator
parseRegions
INFO: Parsed regions [testCache]
Sep 15, 2015 1:49:06 PM
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator doConfigure
INFO: Finished configuration in 13 ms.
testCache = cacheBean.getCacheManager().getCache("testCache") also creates a
default cache.
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/JCache-annotations-using-default-cache-instead-of-MutableConfiguration-or-configuration-file-tp4676198p4676225.html
Sent from the TomEE Users mailing list archive at Nabble.com.