tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1102780 - /tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java
Date Fri, 13 May 2011 15:02:17 GMT
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);
     }
 



Mime
View raw message