From f35d48772e6d3bf5c4a2006cf23bf4731e420b1b Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 25 Aug 2011 11:51:11 +0000 Subject: Allow the binding.sca URI to be configured with the base URI as with all other bindings. The default binding now delegates to other remote bindings which require access to the properly based URI. I've had to make a change to the hazelcast binding that was assuming that the binding URI was the same as the EPR URI which is not the case. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1161525 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/builder/impl/BindingURIBuilderImpl.java | 14 ++++++-------- .../binding/hazelcast/HazelcastBindingProviderFactory.java | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'sca-java-2.x/trunk/modules') diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java index bf89781eb4..114dd45f8c 100644 --- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java +++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java @@ -225,16 +225,14 @@ public class BindingURIBuilderImpl implements CompositeBuilder { // calculate the base URI URI baseURI = null; - if (!(binding instanceof SCABinding)) { - if (defaultBindings != null) { - List uris = defaultBindings.get(binding.getType()); + if (defaultBindings != null) { + List uris = defaultBindings.get(binding.getType()); + if (uris != null && uris.size() > 0) { + baseURI = new URI(addSlashToPath(uris.get(0))); + } else { + uris = defaultBindings.get(DEFAULT); if (uris != null && uris.size() > 0) { baseURI = new URI(addSlashToPath(uris.get(0))); - } else { - uris = defaultBindings.get(DEFAULT); - if (uris != null && uris.size() > 0) { - baseURI = new URI(addSlashToPath(uris.get(0))); - } } } } diff --git a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingProviderFactory.java b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingProviderFactory.java index 3a1b89e83e..5e9d415048 100644 --- a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingProviderFactory.java +++ b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingProviderFactory.java @@ -39,7 +39,7 @@ public class HazelcastBindingProviderFactory implements BindingProviderFactory