diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-19 08:57:59 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-19 08:57:59 +0000 |
commit | ef1bb793d046db4f47dfc331ca340c59a6cd6bcb (patch) | |
tree | 210f6d191f7b7d3d5668aaac3da95c9295c600d3 | |
parent | 3296da32fcd2854428cde18f8e4ff901728c0720 (diff) |
Disable the Hazelcast shutdown hook as it causes race conditions with Tuscany's one which can cause slow shutdowns or exceptions during shutdown
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@935478 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java | 4 |
1 files changed, 4 insertions, 0 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 2e2168aecd..c5ab0a12d1 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 @@ -54,6 +54,7 @@ import com.hazelcast.core.MembershipEvent; import com.hazelcast.core.MembershipListener;
import com.hazelcast.core.MultiMap;
import com.hazelcast.core.Transaction;
+import com.hazelcast.impl.GroupProperties;
import com.hazelcast.nio.Address;
/**
@@ -154,6 +155,9 @@ public class HazelcastEndpointRegistry extends BaseEndpointRegistry implements E }
config.getMapConfig("default").setNearCacheConfig(new NearCacheConfig(0, 0, "NONE", 0, true));
+
+ // Disable the Hazelcast shutdown hook as Tuscany has its own and with both there are race conditions
+ config.setProperty(GroupProperties.PROP_SHUTDOWNHOOK_ENABLED, "false");
this.hazelcastInstance = Hazelcast.newHazelcastInstance(config);
}
|