summaryrefslogtreecommitdiffstats
path: root/java/sca/samples/calculator
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/samples/calculator')
-rw-r--r--java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java7
-rw-r--r--java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java8
2 files changed, 2 insertions, 13 deletions
diff --git a/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java b/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java
index 5496521525..03fc56ceb3 100644
--- a/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java
+++ b/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java
@@ -20,8 +20,6 @@
package calculator;
import org.apache.tuscany.sca.node.Client;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
@@ -32,10 +30,7 @@ import org.apache.tuscany.sca.node.NodeFactory;
public class CalculatorClient {
public static void main(String[] args) throws Exception {
- NodeFactory factory = NodeFactory.newInstance();
- String root = ContributionLocationHelper.getContributionLocation("Calculator.composite");
- Contribution contribution = new Contribution(root, root);
- Node node = factory.createNode("Calculator.composite", contribution);
+ Node node = NodeFactory.newInstance().createNode();
node.start();
diff --git a/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java b/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
index 464950f08c..6bc7e21606 100644
--- a/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
+++ b/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
@@ -21,8 +21,6 @@ package calculator;
import junit.framework.TestCase;
import org.apache.tuscany.sca.node.Client;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.ContributionLocationHelper;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
@@ -36,11 +34,7 @@ public class CalculatorTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- NodeFactory factory = NodeFactory.newInstance();
- String root = ContributionLocationHelper.getContributionLocation("Calculator.composite");
- Contribution contribution = new Contribution(root, root);
- node = factory.createNode("Calculator.composite", contribution);
-
+ node = NodeFactory.newInstance().createNode();
node.start();
calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");