tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r686079 - in /tuscany/java/sca/tools/runtime-inspector/src/test/java: calculator/CalculatorClient.java org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java
Date Thu, 14 Aug 2008 23:10:47 GMT
Author: rfeng
Date: Thu Aug 14 16:10:46 2008
New Revision: 686079

URL: http://svn.apache.org/viewvc?rev=686079&view=rev
Log:
Switch to SCANode API

Modified:
    tuscany/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java
    tuscany/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java

Modified: tuscany/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java?rev=686079&r1=686078&r2=686079&view=diff
==============================================================================
--- tuscany/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java
(original)
+++ tuscany/java/sca/tools/runtime-inspector/src/test/java/calculator/CalculatorClient.java
Thu Aug 14 16:10:46 2008
@@ -19,7 +19,9 @@
 
 package calculator;
 
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
 
 /**
  * This client program shows how to create an SCA runtime, start it,
@@ -28,10 +30,11 @@
 public class CalculatorClient {
     public static void main(String[] args) throws Exception {
 
-        SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");
+        SCANode2 node = SCANode2Factory.newInstance().createSCANodeFromClassLoader("Calculator.composite",
CalculatorClient.class.getClassLoader());
+        node.start();
         
         CalculatorService calculatorService = 
-            scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
+            ((SCAClient) node).getService(CalculatorService.class, "CalculatorServiceComponent");
 
         // Calculate
         System.out.println("3 + 2=" + calculatorService.add(3, 2));
@@ -39,7 +42,7 @@
         System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
         System.out.println("3 / 2=" + calculatorService.divide(3, 2));
 
-        scaDomain.close();
+        node.stop();
     }
 
 }

Modified: tuscany/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java?rev=686079&r1=686078&r2=686079&view=diff
==============================================================================
--- tuscany/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java
(original)
+++ tuscany/java/sca/tools/runtime-inspector/src/test/java/org/apache/tuscany/sca/tools/inspector/RegistryInspectorTestCase.java
Thu Aug 14 16:10:46 2008
@@ -18,25 +18,14 @@
  */
 package org.apache.tuscany.sca.tools.inspector;
 
-import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.OutputStream;
-import java.lang.reflect.Field;
-import java.util.Map;
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.monitor.MonitorFactory;
-import org.apache.tuscany.sca.monitor.Problem;
 import org.apache.tuscany.sca.node.SCAClient;
 import org.apache.tuscany.sca.node.SCAContribution;
 import org.apache.tuscany.sca.node.SCANode2;
 import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-import org.apache.tuscany.sca.tools.inspector.RegistryInspector;
 
 import calculator.CalculatorService;
 



Mime
View raw message