summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain
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/fullapp-domain
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/fullapp-domain')
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml29
-rw-r--r--sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java29
2 files changed, 54 insertions, 4 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml
index fabd131c91..eb7604506d 100644
--- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml
+++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-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/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java
index 599ca75e24..324b68ab57 100644
--- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java
+++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.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 FullAppDomainLauncher {
public static void main(String[] args) throws Exception {
- String[] dmArgs = {"../domainconfig/fullapp"};
- DomainManagerLauncher.main(dmArgs);
+ String rootDir = "../domainconfig/fullapp";
+ 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();
}
}