Author: thomas.heute(a)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;
Show replies by date