diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-31 20:40:47 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-31 20:40:47 +0000 |
commit | c39657a245cb5960093418ace8c078d9d12a4a28 (patch) | |
tree | ba1f7e7eab26733c4eaf9ca4ca1aeb4a04e61b25 /sca-java-2.x/trunk/modules/endpoint-hazelcast | |
parent | ac6b30e350ea3295637262d7d49013f77248d59c (diff) |
Use concurrent hash map to avoid threading issue
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@929710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/endpoint-hazelcast')
-rw-r--r-- | sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java b/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java index dae2c85608..d0a1f0350e 100644 --- a/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java +++ b/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java @@ -25,6 +25,7 @@ import java.util.Collection; import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
@@ -65,7 +66,7 @@ public class HazelcastEndpointRegistry extends BaseEndpointRegistry implements E private HazelcastInstance hazelcastInstance;
protected Map<Object, Object> endpointMap;
- private Map<String, Endpoint> localEndpoints = new HashMap<String, Endpoint>();
+ private Map<String, Endpoint> localEndpoints = new ConcurrentHashMap<String, Endpoint>();
protected MultiMap<String, String> endpointOwners;
private AssemblyFactory assemblyFactory;
|