From ef1bb793d046db4f47dfc331ca340c59a6cd6bcb Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 19 Apr 2010 08:57:59 +0000 Subject: 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 --- .../tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sca-java-2.x/trunk') 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); } -- cgit v1.2.3