summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-04-18 20:51:32 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-04-18 20:51:32 +0000
commita467dda6bffe23643fbcb26ad88e1904f888ca2f (patch)
tree38d8a58b8ecb2f2c09c3377aa68b598308ef0b64 /sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips
parentdedad56c8552cf8d98a29c65262219cfd0ea0f54 (diff)
Remove usage of NodeLauncher and DomainManagerLauncher (TUSCANY-3538)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@935407 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips')
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml30
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java27
2 files changed, 53 insertions, 4 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml
index 9cb30beb3f..ec5da820e7 100644
--- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml
+++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml
@@ -31,9 +31,37 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-launcher</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>${tuscany.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-axis2</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java
index 781949940c..10dfc242e1 100644
--- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java
+++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java
@@ -19,12 +19,33 @@
package scatours;
-import org.apache.tuscany.sca.node.launcher.NodeLauncher;
+import java.io.IOException;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+
+/**
+ * This launcher is only used when running from the binaries directory.
+ * If the binaries directory was built using the mvn -Pselfcontained command,
+ * it's important to ensure that no dependencies other than those explicitly
+ * specified by the launcher jar manifest and its transitive dependencies
+ * are used. This launcher class must therefore avoid using the Tuscany
+ * NodeLauncher class, because NodeLauncher builds a runtime classpath from
+ * (among other things) the TUSCANY_HOME environment variable.
+ */
public class IntroducingTripsLauncher {
public static void main(String[] args) throws Exception {
- String[] dmArgs = {"http://localhost:9990/node-config/TripsNode"};
- NodeLauncher.main(dmArgs);
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/TripsNode");
+ node.start();
+
+ System.out.println("Node started - Press enter to shutdown.");
+ try {
+ System.in.read();
+ } catch (IOException e) {
+ }
+
+ node.stop();
}
}