summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/launchers/databinding-launcher/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-05-24 16:31:41 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-05-24 16:31:41 +0000
commitf5aeea6bc0441c541a21373773bf9a219acf7bd4 (patch)
tree296b233ac6614dbdd39bea1dd856a58874cc4679 /sandbox/travelsample/launchers/databinding-launcher/src
parentf3d9db008824a492d1cd6e66df504c201eff5da7 (diff)
Launcher to start the databinding sample
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@778189 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/launchers/databinding-launcher/src')
-rw-r--r--sandbox/travelsample/launchers/databinding-launcher/src/main/java/scatours/LaunchDatabindingNode.java58
1 files changed, 58 insertions, 0 deletions
diff --git a/sandbox/travelsample/launchers/databinding-launcher/src/main/java/scatours/LaunchDatabindingNode.java b/sandbox/travelsample/launchers/databinding-launcher/src/main/java/scatours/LaunchDatabindingNode.java
new file mode 100644
index 0000000000..b910e90a2d
--- /dev/null
+++ b/sandbox/travelsample/launchers/databinding-launcher/src/main/java/scatours/LaunchDatabindingNode.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package scatours;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+
+public class LaunchDatabindingNode {
+ public static void main(String[] args) throws Exception {
+ LaunchDatabindingNode.launchFromFileSystemDir();
+ }
+
+ // OK for development but you must launch the node from this module
+ public static void launchFromFileSystemDir(){
+ try {
+ SCANode node1 = SCANodeFactory.newInstance().createSCANode(null,
+ new SCAContribution("paymentjava", "../../contributions/payment-java-contribution/target/classes"),
+ new SCAContribution("client", "../../contributions/databinding-client-contribution/target/classes"));
+
+ SCANode node2 = SCANodeFactory.newInstance().createSCANode(null,
+ new SCAContribution("creditcardpaymentjaxb", "../../contributions/creditcard-payment-sdo-contribution/target/classes"));
+
+
+ node1.start();
+ node2.start();
+
+ Runnable runner = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable");
+ runner.run();
+
+ node1.stop();
+ node2.stop();
+
+ } catch (Throwable th) {
+ th.printStackTrace();
+ }
+ }
+}