Author: dkulp Date: Fri Jun 8 18:36:42 2012 New Revision: 1348181 URL: http://svn.apache.org/viewvc?rev=1348181&view=rev Log: Merged revisions 1348175 via svn merge from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
........ r1348175 | dkulp | 2012-06-08 14:21:27 -0400 (Fri, 08 Jun 2012) | 11 lines Merged revisions 1347763 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1347763 | dkulp | 2012-06-07 15:26:00 -0400 (Thu, 07 Jun 2012) | 4 lines Use configuration from the ehcache config to create the caches Since the token caches are per-endpoint, use smaller maxes for the heap to avoid exploding the memory usage. ........ ........ Modified: cxf/branches/2.4.x-fixes/ (props changed) cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/cxf-ehcache.xml Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java?rev=1348181&r1=1348180&r2=1348181&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/cache/EHCacheReplayCache.java Fri Jun 8 18:36:42 2012 @@ -26,6 +26,7 @@ import net.sf.ehcache.Cache; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Ehcache; import net.sf.ehcache.Element; +import net.sf.ehcache.config.CacheConfiguration; import org.apache.cxf.Bus; import org.apache.cxf.buslifecycle.BusLifeCycleListener; @@ -52,7 +53,9 @@ public class EHCacheReplayCache implemen } cacheManager = EHCacheManagerHolder.getCacheManager(bus, configFileURL); - Ehcache newCache = new Cache(key, 50000, true, false, DEFAULT_TTL, DEFAULT_TTL); + CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager); + + Ehcache newCache = new Cache(cc); cache = cacheManager.addCacheIfAbsent(newCache); } Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/cxf-ehcache.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/cxf-ehcache.xml?rev=1348181&r1=1348180&r2=1348181&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/cxf-ehcache.xml (original) +++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/resources/cxf-ehcache.xml Fri Jun 8 18:36:42 2012 @@ -3,7 +3,7 @@ <diskStore path="java.io.tmpdir"/> <defaultCache - maxElementsInMemory="50000" + maxEntriesLocalHeap="5000" eternal="false" timeToIdleSeconds="3600" timeToLiveSeconds="3600" @@ -13,4 +13,5 @@ diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU" /> + </ehcache>
