summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/sca-client-impl
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-02-10 10:12:41 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-02-10 10:12:41 +0000
commitd529a4afaab372c1c8e5a21ab5b76aa7f8cd0f3d (patch)
tree0e5c237fba96bad471eff45ad82b1e7326e46154 /sca-java-2.x/trunk/modules/sca-client-impl
parentb64dbf103fae7b9adc24c56a6ae426b07bc2e673 (diff)
Call node init() to ensure that the extension point registry is initialized. Remove the local test from the default client impl. This local test will be carried out by the default binding.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@908434 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-client-impl')
-rw-r--r--sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java21
1 files changed, 3 insertions, 18 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java
index dabf61e7e3..146d1c4017 100644
--- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java
+++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java
@@ -76,6 +76,7 @@ public class SCAClientFactoryImpl extends SCAClientFactory {
super(domainURI);
this.nodeFactory = (NodeFactoryImpl)NodeFactory.getInstance();
+ this.nodeFactory.init();
this.extensionsRegistry = nodeFactory.getExtensionPoints();
DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionsRegistry);
this.endpointRegistry = domainRegistryFactory.getEndpointRegistry(null, getDomainURI().toString()); // TODO: shouldnt use null for reg uri
@@ -103,12 +104,7 @@ public class SCAClientFactoryImpl extends SCAClientFactory {
throw new NoSuchServiceException(serviceName);
}
Endpoint endpoint = eps.get(0); // TODO: what should be done with multiple endpoints?
-
-// Node localNode = findLocalNode(endpoint);
-// if (localNode != null) {
-// return localNode.getService(serviceInterface, serviceName);
-// }
-
+
RuntimeEndpointReference epr;
try {
epr = createEndpointReference(endpoint, serviceInterface);
@@ -118,18 +114,7 @@ public class SCAClientFactoryImpl extends SCAClientFactory {
return proxyFactory.createProxy(serviceInterface, epr);
}
-
- private Node findLocalNode(Endpoint endpoint) {
- for (Node node : nodeFactory.getNodes().values()) {
- for (Endpoint ep : ((NodeImpl)node).getServiceEndpoints()) {
- if (endpoint.getURI().equals(ep.getURI())) {
- return node;
- }
- }
- }
- return null;
- }
-
+
private RuntimeEndpointReference createEndpointReference(Endpoint endpoint, Class<?> businessInterface)
throws CloneNotSupportedException, InvalidInterfaceException {
Component component = endpoint.getComponent();