diff options
-rw-r--r-- | sandbox/travelsample/launchers/policy/build.xml | 4 | ||||
-rw-r--r-- | sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java (renamed from sandbox/travelsample/launchers/policy/src/main/java/scatours/LaunchPolicyNode.java) | 37 |
2 files changed, 18 insertions, 23 deletions
diff --git a/sandbox/travelsample/launchers/policy/build.xml b/sandbox/travelsample/launchers/policy/build.xml index aaf5c8c732..ec8155b871 100644 --- a/sandbox/travelsample/launchers/policy/build.xml +++ b/sandbox/travelsample/launchers/policy/build.xml @@ -17,7 +17,7 @@ * under the License. --> -<project name="scatours-introducing-launcher" default="compile"> +<project name="scatours-launcher-policy" default="compile"> <property environment="env"/> <target name="compile"> @@ -31,7 +31,7 @@ </target> <target name="run"> - <java classname="scatours.IntroducingLauncher" fork="true"> + <java classname="scatours.PolicyLauncher" fork="true"> <classpath> <pathelement location="target/classes"/> <pathelement location="${env.TUSCANY}/lib/tuscany-sca-manifest.jar"/> diff --git a/sandbox/travelsample/launchers/policy/src/main/java/scatours/LaunchPolicyNode.java b/sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java index fc84206c46..c55c8d4c13 100644 --- a/sandbox/travelsample/launchers/policy/src/main/java/scatours/LaunchPolicyNode.java +++ b/sandbox/travelsample/launchers/policy/src/main/java/scatours/PolicyLauncher.java @@ -24,29 +24,24 @@ import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; import org.apache.tuscany.sca.node.SCANodeFactory; -public class LaunchPolicyNode { +public class PolicyLauncher { public static void main(String[] args) throws Exception { - try { - SCANode node1 = SCANodeFactory.newInstance().createSCANode(null, - new SCAContribution("client", "../../contributions/policy-client/target/classes"), - new SCAContribution("payment", "../../contributions/payment-java-policy/target/classes")); + SCANode node1 = SCANodeFactory.newInstance().createSCANode(null, + new SCAContribution("client", "../../contributions/policy-client/target/classes"), + new SCAContribution("payment", "../../contributions/payment-java-policy/target/classes")); - node1.start(); - - SCANode node2 = SCANodeFactory.newInstance().createSCANode(null, - new SCAContribution("creditcard", "../../contributions/creditcard-payment-jaxb-policy/target/classes")); - - node2.start(); - - Runnable client = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable"); - client.run(); - - node1.stop(); - node2.stop(); - - } catch (Throwable th) { - th.printStackTrace(); - } + node1.start(); + + SCANode node2 = SCANodeFactory.newInstance().createSCANode(null, + new SCAContribution("creditcard", "../../contributions/creditcard-payment-jaxb-policy/target/classes")); + + node2.start(); + + Runnable client = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable"); + client.run(); + + node1.stop(); + node2.stop(); } } |