summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/sca-client-rmi/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-14 12:08:06 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-14 12:08:06 +0000
commitf8b1ceadc8f5f315cfbda165fdd09dfdcc84c2d3 (patch)
tree960b5afd8b999288a30d5276cd58b92ab7adaf3c /sca-java-2.x/trunk/modules/sca-client-rmi/src/main
parentd7d84af71f1aaf91a99ff016749a317978673b82 (diff)
Update the rmi base sca client to use its own registry when no other nodes started in the JVM
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@899173 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/sca-client-rmi/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java5
1 files changed, 5 insertions, 0 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 3a96ced7c8..39dd71048b 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
@@ -45,6 +45,11 @@ public class SCAClientFactoryImpl extends SCAClientFactory {
public SCAClientFactoryImpl(URI domainURI) {
super(domainURI);
NodeImpl node = (NodeImpl)NodeFactory.newInstance().createNode(domainURI);
+ if (node.getExtensionPoints() == null) {
+ // No local nodes have been started (for this domain?)
+ // ideally we'll use the Hazelcast client but for now just start a node
+ node.start();
+ }
this.extensionsRegistry = node.getExtensionPoints();
UtilityExtensionPoint utilities = extensionsRegistry.getExtensionPoint(UtilityExtensionPoint.class);
DomainRegistryFactory domainRegistryFactory = utilities.getUtility(DomainRegistryFactory.class);