You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2010/04/19 10:57:59 UTC

svn commit: r935478 - /tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java

Author: antelder
Date: Mon Apr 19 08:57:59 2010
New Revision: 935478

URL: http://svn.apache.org/viewvc?rev=935478&view=rev
Log:
Disable the Hazelcast shutdown hook as it causes race conditions with Tuscany's one which can cause slow shutdowns or exceptions during shutdown

Modified:
    tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java

Modified: tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java?rev=935478&r1=935477&r2=935478&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java Mon Apr 19 08:57:59 2010
@@ -54,6 +54,7 @@ import com.hazelcast.core.MembershipEven
 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 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);
     }