summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java11
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.