From c0b480ce1460f90294bd2b4e95573c0e7ae64118 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 18 Jan 2010 12:00:21 +0000 Subject: Change Node getInstance/newInstance methods so that newInstance really creates a new instance, and getInstance returns the singleton instance git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@900354 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java | 4 ++-- .../java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java | 4 ++-- .../org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java | 4 ++-- .../java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sca-java-2.x/trunk/modules/binding-sca-runtime-rmi') diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java index b68fe7fed4..0dbe8b864b 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java @@ -42,11 +42,11 @@ public class AsynchTestCase { try { // create and start nodes Contribution contrib = new Contribution("asynch", "./target/test-classes/asynchReference"); - nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeA.start(); contrib = new Contribution("asynch", "./target/test-classes/asynchService"); - nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeB.start(); } catch (Exception ex) { diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java index 4c05006ba6..b981bbc943 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java @@ -40,11 +40,11 @@ public class CallbackTestCase { try { // create and start nodes Contribution contrib = new Contribution("reference", "./target/test-classes/callbackReference"); - nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeA.start(); contrib = new Contribution("service", "./target/test-classes/callbackService"); - nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeB.start(); } catch (Exception ex) { diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java index 4f1ad18a31..992850e470 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java @@ -41,11 +41,11 @@ public class PromotionTestCase { try { // create and start nodes Contribution contrib = new Contribution("reference", "./target/test-classes/promotionReference"); - nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeA.start(); contrib = new Contribution("service", "./target/test-classes/promotionService"); - nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeB.start(); } catch (Exception ex) { diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java index 73354efbad..a6f4f216d6 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java @@ -41,11 +41,11 @@ public class SimpleTestCase { try { // create and start nodes Contribution contrib = new Contribution("reference", "./target/test-classes/simpleReference"); - nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeA.start(); contrib = new Contribution("service", "./target/test-classes/simpleService"); - nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib); nodeB.start(); } catch (Exception ex) { -- cgit v1.2.3