diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-25 11:51:11 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-25 11:51:11 +0000 |
commit | f35d48772e6d3bf5c4a2006cf23bf4731e420b1b (patch) | |
tree | 58623353c1d3f05cdafee1d4d2f518d930747322 /sca-java-2.x/trunk/modules | |
parent | d571ecabe140d9fd90505a9a8ab60ca2e0e50f35 (diff) |
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
Diffstat (limited to 'sca-java-2.x/trunk/modules')
2 files changed, 7 insertions, 9 deletions
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<String> uris = defaultBindings.get(binding.getType()); + if (defaultBindings != null) { + List<String> 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<H public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpointReference) { InterfaceContract interfaceContract = endpointReference.getGeneratedWSDLContract(endpointReference.getComponentReferenceInterfaceContract()); interfaceContract.getInterface().resetDataBinding(DOMDataBinding.NAME); - return new HazelcastReferenceBindingProvider(extensionsRegistry, endpointReference.getBinding().getURI(), interfaceContract); + return new HazelcastReferenceBindingProvider(extensionsRegistry, endpointReference.getTargetEndpoint().getURI(), interfaceContract); } public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { |