summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-05-26 12:36:35 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-05-26 12:36:35 +0000
commit64af928d87c8e57c817c9c80c9c34c3601ebe245 (patch)
tree178d57557a44bb37659321d3b620e33b06cfc613 /sca-java-2.x/trunk/samples/launcher-embedded-osgi/src
parent7752fd6ecdab2516a83fa36ca62be45283a759c6 (diff)
A little bit of tidying in the launchers. I've disabled the binding.ws target in the osgi launcher as under ant it's not working properly.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@948413 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/samples/launcher-embedded-osgi/src')
-rw-r--r--sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/launcher/SampleJSELauncher.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/launcher/SampleJSELauncher.java b/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/launcher/SampleJSELauncher.java
index 68059099db..e506f982de 100644
--- a/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/launcher/SampleJSELauncher.java
+++ b/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/launcher/SampleJSELauncher.java
@@ -19,8 +19,13 @@
package launcher;
+import java.net.URI;
+
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+import org.oasisopen.sca.client.SCAClientFactory;
import calculator.CalculatorService;
@@ -51,6 +56,7 @@ public class SampleJSELauncher extends RuntimeIntegration {
} else {
System.out.println("Sample contribution " + contribution + "not found");
}
+
}
/**
@@ -60,24 +66,17 @@ public class SampleJSELauncher extends RuntimeIntegration {
public void launchBindingSCACalculator(){
Node node = startNode(new Contribution("c1", "../binding-sca/contribution-calculator/target/sample-contribution-binding-sca-calculator.jar"));
- //CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
- // TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
- //double result = calculator.add(3, 2);
- //System.out.println("3 + 2 = " + result);
- //if (result != 5.0){
- // throw new SampleLauncherException();
- //}
stopNode(node);
}
/*
* Using a Tuscany specific mechanism for getting at local service proxies
*/
- public void launchBindingWSCalculator(){
- Node node = startNode(new Contribution("c1", "../contribution-binding-ws-calculator/target/classes"));
+ public void launchBindingWSCalculator() throws NoSuchDomainException, NoSuchServiceException{
+ Node node = startNode(new Contribution("c1", "../contribution-binding-ws-calculator/target/sample-contribution-binding-ws-calculator.jar"));
CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
- // TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
+
double result = calculator.add(3, 2);
System.out.println("3 + 2 = " + result);
if (result != 5.0){