From f8b1ceadc8f5f315cfbda165fdd09dfdcc84c2d3 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 14 Jan 2010 12:08:06 +0000 Subject: 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 --- .../java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org') 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); -- cgit v1.2.3