[gatein-commits] gatein SVN: r4975 - epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/application.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Nov 9 03:26:30 EST 2010


Author: thomas.heute at jboss.com
Date: 2010-11-09 03:26:30 -0500 (Tue, 09 Nov 2010)
New Revision: 4975

Modified:
   epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
Log:
JBEPP-577: Concurrency problem (HashMap used in class ConfigurationManager in multithreaded environment)


Modified: epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java	2010-11-09 08:18:59 UTC (rev 4974)
+++ epp/portal/branches/EPP_5_1_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java	2010-11-09 08:26:30 UTC (rev 4975)
@@ -40,6 +40,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * May 10, 2006
@@ -55,8 +56,16 @@
     * <p/>
     * The components of which we manage the configuration
     */
-   private Map<String, Component> configs_ = new HashMap<String, Component>();
+   //private Map<String, Component> configs_ = new HashMap<String, Component>();
 
+   /**
+    * Minh Hoang TO: First attempt to synchronize the map, we simply replace HashMap with ConcurrentHashMap
+    * and default values for load factor, initial capacity and concurrentcyLevel
+    * 
+    * TODO: Need to examine the performance influence in the future for a better synchronizing 
+    */
+   private Map<String, Component> configs_ = new ConcurrentHashMap<String, Component>();
+   
    /** The logger. */
    private final Logger log;
 



More information about the gatein-commits mailing list