Author: asoldano
Date: Mon Sep 19 09:40:06 2016
New Revision: 1761410

URL: http://svn.apache.org/viewvc?rev=1761410&view=rev
Log:
[WSS-587] Fix concurrency issue in EHCacheManagerHolder

Modified:
    
webservices/wss4j/branches/2_0_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java

Modified: 
webservices/wss4j/branches/2_0_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java
URL: 
http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java?rev=1761410&r1=1761409&r2=1761410&view=diff
==============================================================================
--- 
webservices/wss4j/branches/2_0_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java
 (original)
+++ 
webservices/wss4j/branches/2_0_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/cache/EHCacheManagerHolder.java
 Mon Sep 19 09:40:06 2016
@@ -90,7 +90,7 @@ public final class EHCacheManagerHolder
         return cc;
     }
     
-    public static CacheManager getCacheManager(String confName, URL 
configFileURL) {
+    public static synchronized CacheManager getCacheManager(String confName, 
URL configFileURL) {
         CacheManager cacheManager = null;
         if (configFileURL == null) {
             //using the default
@@ -147,7 +147,7 @@ public final class EHCacheManagerHolder
     }
 
 
-    public static void releaseCacheManger(CacheManager cacheManager) {
+    public static synchronized void releaseCacheManger(CacheManager 
cacheManager) {
         AtomicInteger a = COUNTS.get(cacheManager.getName());
         if (a == null) {
             return;


Reply via email to