diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-16 08:22:38 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-16 08:22:38 +0000 |
commit | a83d219c6ed731ce35f89de9364ad8bfb939515d (patch) | |
tree | 20e187cf5a408a8163ff2f2d74727f184cdc1388 /sca-java-2.x/trunk/modules/sca-client-impl/src/main/java | |
parent | 64fa14787b2b4b7b30756a360a34a55631e592f6 (diff) |
TUSCANY-4027 - tweak to this change to ignore any callback endpoints in the registry that match
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1301371 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-client-impl/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java index 8dcb7b91d9..a98b6e93cc 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java @@ -19,6 +19,7 @@ package org.apache.tuscany.sca.client.impl;
+import java.util.Iterator;
import java.util.List;
import org.apache.tuscany.sca.assembly.ComponentService;
@@ -38,6 +39,16 @@ public class DefaultEndpointFinder implements EndpointFinder { if (eps == null || eps.size() < 1) {
throw new NoSuchServiceException(serviceName);
}
+
+ // remove any callback services from the array as we aren't
+ // expecting SCA clients to connect to callback service
+ Iterator<Endpoint> iterator = eps.iterator();
+ while (iterator.hasNext()){
+ Endpoint ep = iterator.next();
+ if (ep.getService().isForCallback()){
+ iterator.remove();
+ }
+ }
// If lookup is by component name only and there are multiple matches, verify all matches
// are from the same service. Otherwise it is ambiguous which service the client wants.
|