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-domain | |
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-domain')
2 files changed, 54 insertions, 4 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml index ebe578d22a..43d256e212 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml @@ -31,9 +31,36 @@ <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-domain-manager</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-binding-jsonrpc</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-xml</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java index b9f7fe040f..1b47ef92bd 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java @@ -19,12 +19,35 @@ package scatours;
-import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
+import java.io.IOException;
+import org.apache.tuscany.sca.domain.manager.launcher.DomainManagerLauncherBootstrap;
+import org.apache.tuscany.sca.node.SCANode;
+
+/**
+ * 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
+ * DomainManagerLauncher class, because DomainManagerLauncher builds a
+ * runtime classpath from (among other things) the TUSCANY_HOME environment
+ * variable.
+ */
public class IntroducingDomainLauncher {
public static void main(String[] args) throws Exception {
- String[] dmArgs = {"../domainconfig/introducing"};
- DomainManagerLauncher.main(dmArgs);
+ String rootDir = "../domainconfig/introducing";
+ DomainManagerLauncherBootstrap bootstrap = new DomainManagerLauncherBootstrap(rootDir);
+ SCANode node = bootstrap.getNode();
+ node.start();
+
+ System.out.println("Domain manager started - Press enter to shutdown.");
+ try {
+ System.in.read();
+ } catch (IOException e) {
+ }
+
+ node.stop();
}
}
|