tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1301371 - /tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java
Date Fri, 16 Mar 2012 08:22:38 GMT
Author: slaws
Date: Fri Mar 16 08:22:38 2012
New Revision: 1301371

URL: http://svn.apache.org/viewvc?rev=1301371&view=rev
Log:
TUSCANY-4027 - tweak to this change to ignore any callback endpoints in the registry that
match

Modified:
    tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java

Modified: tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java?rev=1301371&r1=1301370&r2=1301371&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/DefaultEndpointFinder.java
Fri Mar 16 08:22:38 2012
@@ -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 imple
         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.



Mime
View raw message