Author: hoang_to
Date: 2010-11-02 22:58:43 -0400 (Tue, 02 Nov 2010)
New Revision: 4911
Modified:
portal/branches/branch-GTNPORTAL-1592/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
Log:
GTNPORTAL-1545: Concurrency problem
Modified:
portal/branches/branch-GTNPORTAL-1592/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1592/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java 2010-11-03
02:43:23 UTC (rev 4910)
+++
portal/branches/branch-GTNPORTAL-1592/webui/framework/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java 2010-11-03
02:58:43 UTC (rev 4911)
@@ -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