You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2014/06/16 11:36:25 UTC

svn commit: r1602828 - /webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java

Author: coheigea
Date: Mon Jun 16 09:36:25 2014
New Revision: 1602828

URL: http://svn.apache.org/r1602828
Log:
[WSS-503] - Share an existing global ehcache manager for ws security replay caches. Thanks to Jason Pell for the patch.

Modified:
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java?rev=1602828&r1=1602827&r2=1602828&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheReplayCache.java Mon Jun 16 09:36:25 2014
@@ -123,6 +123,11 @@ public class EHCacheReplayCache implemen
     @Override
     public synchronized void close() {
         if (cacheManager != null) {
+            // this step is especially important for global shared cache manager
+            if (cache != null) {
+                cacheManager.removeCache(cache.getName());
+            }
+
             EHCacheManagerHolder.releaseCacheManger(cacheManager);
             cacheManager = null;
             cache = null;