diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-18 20:51:32 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-18 20:51:32 +0000 |
commit | a467dda6bffe23643fbcb26ad88e1904f888ca2f (patch) | |
tree | 38d8a58b8ecb2f2c09c3377aa68b598308ef0b64 /sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours | |
parent | dedad56c8552cf8d98a29c65262219cfd0ea0f54 (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-tours')
2 files changed, 53 insertions, 4 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml index 1886b977a4..5970149bc9 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/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-tours/src/main/java/scatours/IntroducingToursLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java index 7a1dd79890..c99bf58e07 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.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 IntroducingToursLauncher {
public static void main(String[] args) throws Exception {
- String[] dmArgs = {"http://localhost:9990/node-config/ToursNode"};
- NodeLauncher.main(dmArgs);
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/ToursNode");
+ node.start();
+
+ System.out.println("Node started - Press enter to shutdown.");
+ try {
+ System.in.read();
+ } catch (IOException e) {
+ }
+
+ node.stop();
}
}
|