diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-31 11:44:26 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-31 11:44:26 +0000 |
commit | 28ce69a39ba3dac238d53fdb8ec6d6fc0eb27794 (patch) | |
tree | ad7ab7171a2fbf756deba5421a1bf6e117b72f4d | |
parent | ba21e0bffe6c30431150890f80bd48763105b8c5 (diff) |
Set the client connection attempts to 1 so that clients only make a single attempt to connect to the domain
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1087257 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/client/HazelcastClientEndpointRegistry.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/client/HazelcastClientEndpointRegistry.java b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/client/HazelcastClientEndpointRegistry.java index fe73a0882e..2b99b5f454 100644 --- a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/client/HazelcastClientEndpointRegistry.java +++ b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/client/HazelcastClientEndpointRegistry.java @@ -34,6 +34,8 @@ import org.apache.tuscany.sca.endpoint.hazelcast.HazelcastEndpointRegistry; import org.apache.tuscany.sca.endpoint.hazelcast.RegistryConfig; import org.apache.tuscany.sca.runtime.RuntimeProperties; +import com.hazelcast.client.ClientProperties; +import com.hazelcast.client.ClientProperties.ClientPropertyName; import com.hazelcast.client.HazelcastClient; import com.hazelcast.core.HazelcastInstance; @@ -96,7 +98,9 @@ public class HazelcastClientEndpointRegistry extends HazelcastEndpointRegistry { } } - this.hazelcastClient = HazelcastClient.newHazelcastClient(rc.getUserid(), rc.getPassword(), rc.getWKAs().toArray(new String[0])); + ClientProperties clientProps = ClientProperties.crateBaseClientProperties(rc.getUserid(), rc.getPassword()); + clientProps.setPropertyValue(ClientPropertyName.INIT_CONNECTION_ATTEMPTS_LIMIT, "1"); + this.hazelcastClient = HazelcastClient.newHazelcastClient(clientProps, rc.getWKAs().toArray(new String[0])); } @Override |