diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-31 15:32:51 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-31 15:32:51 +0000 |
commit | b0a656ba70a52c2aeffe80b77b80b99392b1c6a2 (patch) | |
tree | d8fcd1cd23870612e383b74aa4d4b7d26829dabf /sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java | |
parent | 3400d2e1e16f6d8af44f0d5481208dd7aef165a8 (diff) |
Update sca client to choose an SCA binding endpoint if one is available
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1238666 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java index a8f7af6be7..5806101560 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java @@ -25,7 +25,6 @@ import java.lang.reflect.Proxy; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; -import java.util.List; import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Component; @@ -46,8 +45,8 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; -import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.ContributionDescription; +import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; @@ -133,11 +132,7 @@ public class RemoteServiceInvocationHandler implements InvocationHandler { CompositeContext compositeContext = new CompositeContext(extensionsRegistry, domainRegistry, null, domainURI, null, null); - List<Endpoint> eps = domainRegistry.findEndpoint(serviceName); - if (eps == null || eps.size() < 1) { - throw new NoSuchServiceException(serviceName); - } - Endpoint endpoint = eps.get(0); // TODO: what should be done with multiple endpoints? + Endpoint endpoint = RuntimeUtils.findEndpoint(domainRegistry, serviceName); if (serviceInterface == null) { try { |