summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-19 08:57:59 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-19 08:57:59 +0000
commitef1bb793d046db4f47dfc331ca340c59a6cd6bcb (patch)
tree210f6d191f7b7d3d5668aaac3da95c9295c600d3 /sca-java-2.x
parent3296da32fcd2854428cde18f8e4ff901728c0720 (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
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java4
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);
}