summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-07-15 15:29:27 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-07-15 15:29:27 +0000
commit88b670871cd7ea084300e58fa6c9870683443597 (patch)
treebc70cc4c563a18691248c0d696228b3d0c82c391 /sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher
parent8343c879a235d4200d11ac894e889c80efde359e (diff)
A bit of tidying to remove some chaff and add the async callback pattern into the sample
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@964464 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher')
-rw-r--r--sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher/src/main/java/launcher/SampleJSELauncher.java52
1 files changed, 3 insertions, 49 deletions
diff --git a/sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher/src/main/java/launcher/SampleJSELauncher.java b/sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher/src/main/java/launcher/SampleJSELauncher.java
index 20bd1a200c..a5e6d75d24 100644
--- a/sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher/src/main/java/launcher/SampleJSELauncher.java
+++ b/sca-java-2.x/trunk/contrib/samples/async/embedded-jse-async-sample-launcher/src/main/java/launcher/SampleJSELauncher.java
@@ -34,58 +34,12 @@ public class SampleJSELauncher extends RuntimeIntegration {
protected boolean waitBeforeStopping = false;
public static void main(String[] args) throws Exception {
-
- // get the contribution name from the 1st argument it there is one
-
-
- // assume that more than one argument means that the caller wants to
- // keep the SCA application running while other clients use the services
- boolean waitBeforeStopping = false;
-
- if (args != null && args.length > 1 && args[1].equals("waitBeforeStopping")){
- waitBeforeStopping = true;
- }
-
- SampleJSELauncher launcher = new SampleJSELauncher(waitBeforeStopping);
-
- launcher.launchImplementationJavaCalculatorAsync();
-
+ SampleJSELauncher launcher = new SampleJSELauncher();
+ launcher.launchImplementationJavaCalculatorAsync();
}
-
- public SampleJSELauncher(boolean waitBeforeStopping){
- this.waitBeforeStopping = waitBeforeStopping;
- }
-
- /**
- * Wait for user input. Allows us to keep the Tuscany runtime and the SCA application
- * running while other clients access the services provided
- */
- public void waitBeforeStopping(){
- if (waitBeforeStopping){
- try {
- System.out.println("Press key to continue");
- int input = System.in.read();
- } catch (Exception ex) {
- // do nothing
- }
- }
- }
-
- /**
- * The contribution-binding-sca-calculator contribution includes a client component
- * that calls the CalculatorServiceComponent from an operation marked by @Init.
- */
+
public void launchImplementationJavaCalculatorAsync(){
Node node = startNode(new Contribution("c1", "../sample-contribution-implementation-java-calculator-async/target/sample-contribution-implementation-java-calculator-async.jar"));
- waitBeforeStopping();
stopNode(node);
}
-
-
-// public void launchImplementationJavaCalculator(){
-// Node node = startNode(new Contribution("c1", "../contribution-implementation-java-calculator/target/classes"));
-// waitBeforeStopping();
-// stopNode(node);
-// }
-
}