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 2011/05/13 17:02:17 UTC

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

Author: antelder
Date: Fri May 13 15:02:17 2011
New Revision: 1102780

URL: http://svn.apache.org/viewvc?rev=1102780&view=rev
Log:
Move the setting of the local endpoints to before the other stores to fix the case where the entryAdded is being driven first on anothe rthread which causes the isLocal test to give the wrong answer

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

Modified: tuscany/sca-java-2.x/trunk/modules/domain-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/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java?rev=1102780&r1=1102779&r2=1102780&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java Fri May 13 15:02:17 2011
@@ -271,6 +271,7 @@ public class HazelcastEndpointRegistry e
         Transaction txn = hazelcastInstance.getTransaction();
         txn.begin();
         try {
+            localEndpoints.put(endpointURI, endpoint);
             endpointMap.put(endpointURI, endpoint);
             endpointWsdls.put(endpointURI, wsdl);
             endpointOwners.put(localMemberAddr, endpointURI);
@@ -279,7 +280,6 @@ public class HazelcastEndpointRegistry e
             txn.rollback();
             throw new ServiceRuntimeException(e);
         }
-        localEndpoints.put(endpointURI, endpoint);
         logger.info("Add endpoint - " + endpoint);
     }