From 1b6f9397e0ec74347eedbea1711a144a0327c45e Mon Sep 17 00:00:00 2001 From: mcombellack Date: Wed, 20 May 2009 08:59:10 +0000 Subject: Renamed the LaunchNode class to be more descriptive git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776625 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/scatours/LaunchIntroducingNode.java | 63 ++++++++++++++++++++++ .../src/main/java/scatours/LaunchNode.java | 63 ---------------------- 2 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchIntroducingNode.java delete mode 100644 sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchNode.java diff --git a/sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchIntroducingNode.java b/sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchIntroducingNode.java new file mode 100644 index 0000000000..c3f48b463e --- /dev/null +++ b/sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchIntroducingNode.java @@ -0,0 +1,63 @@ +/* + * 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 java.math.BigDecimal; + +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 LaunchIntroducingNode { + + public static void main(String[] args) throws Exception { + LaunchIntroducingNode.launchFromFileSystemDir(); + } + + // OK for development but you must launch the node from this module + public static void launchFromFileSystemDir(){ + try { + SCANode node = SCANodeFactory.newInstance().createSCANode(null, + new SCAContribution("goodvaluetrips", "../../contributions/introducing-goodvaluetrips-contribution/target/classes"), + new SCAContribution("tuscanyscatours", "../../contributions/introducing-tuscanyscatours-contribution/target/classes")); + + node.start(); + + Bookings bookings = ((SCAClient)node).getService(Bookings.class, + "TripBooking/Bookings"); + + System.out.println("Trip boooking code = " + + bookings.newBooking("FS1APR4", 1)); + + Checkout checkout = ((SCAClient)node).getService(Checkout.class, + "ShoppingCart/Checkout"); + + checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10"); + + + node.stop(); + + } catch (Throwable th) { + th.printStackTrace(); + } + } +} diff --git a/sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchNode.java b/sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchNode.java deleted file mode 100644 index 764a8c0854..0000000000 --- a/sandbox/travelsample/launchers/introducing-launcher/src/main/java/scatours/LaunchNode.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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 java.math.BigDecimal; - -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 LaunchNode { - - public static void main(String[] args) throws Exception { - LaunchNode.launchFromFileSystemDir(); - } - - // OK for development but you must launch the node from this module - public static void launchFromFileSystemDir(){ - try { - SCANode node = SCANodeFactory.newInstance().createSCANode(null, - new SCAContribution("goodvaluetrips", "../../contributions/introducing-goodvaluetrips-contribution/target/classes"), - new SCAContribution("tuscanyscatours", "../../contributions/introducing-tuscanyscatours-contribution/target/classes")); - - node.start(); - - Bookings bookings = ((SCAClient)node).getService(Bookings.class, - "TripBooking/Bookings"); - - System.out.println("Trip boooking code = " + - bookings.newBooking("FS1APR4", 1)); - - Checkout checkout = ((SCAClient)node).getService(Checkout.class, - "ShoppingCart/Checkout"); - - checkout.makePayment(new BigDecimal("1995.00"), "1234567843218765 10/10"); - - - node.stop(); - - } catch (Throwable th) { - th.printStackTrace(); - } - } -} -- cgit v1.2.3