summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-13 15:40:39 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-13 15:40:39 +0000
commiteede9d93293a288f2aebdd84694fa597fb0e88ff (patch)
treea4779311193ad3a0c76ad44000b19b208a0e3648 /sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java
parent47968edde85283c57e1a4fe03284c9857f784821 (diff)
Change to use a dummy node to get at the JVM wide cache of endpoint registries
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@898802 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java b/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java
index e64b2c8917..3a96ced7c8 100644
--- a/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java
+++ b/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java
@@ -24,11 +24,12 @@ import java.lang.reflect.Proxy;
import java.net.URI;
import java.util.List;
-import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.NodeFinder;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
import org.apache.tuscany.sca.runtime.DomainRegistryFactory;
import org.apache.tuscany.sca.runtime.EndpointRegistry;
import org.oasisopen.sca.NoSuchDomainException;
@@ -43,19 +44,11 @@ public class SCAClientFactoryImpl extends SCAClientFactory {
public SCAClientFactoryImpl(URI domainURI) {
super(domainURI);
-
- if (!"vm".equals(domainURI.getScheme())) {
- this.extensionsRegistry = new DefaultExtensionPointRegistry();
- UtilityExtensionPoint utilities = extensionsRegistry.getExtensionPoint(UtilityExtensionPoint.class);
- DomainRegistryFactory domainRegistryFactory = utilities.getUtility(DomainRegistryFactory.class);
- this.endpointRegistry = domainRegistryFactory.getEndpointRegistry(getDomainURI().toString(), getDomainName());
-
- try {
- // TODO: wait a mo for the endpoint registry to replicate
- Thread.sleep(5000);
- } catch (InterruptedException e) {
- }
- }
+ NodeImpl node = (NodeImpl)NodeFactory.newInstance().createNode(domainURI);
+ this.extensionsRegistry = node.getExtensionPoints();
+ UtilityExtensionPoint utilities = extensionsRegistry.getExtensionPoint(UtilityExtensionPoint.class);
+ DomainRegistryFactory domainRegistryFactory = utilities.getUtility(DomainRegistryFactory.class);
+ this.endpointRegistry = domainRegistryFactory.getEndpointRegistry(getDomainURI().toString(), node.getConfiguration().getDomainName());
}
@Override