summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java
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-domain/src/main/java
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-domain/src/main/java')
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java29
1 files changed, 26 insertions, 3 deletions
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();
}
}