diff options
9 files changed, 226 insertions, 28 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml b/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml index eac25092b2..ab54f9b7d2 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml @@ -111,10 +111,10 @@ </target>
<target name="run-fullapp-domain">
- <java classname="org.apache.tuscany.sca.node.launcher.DomainManagerLauncher" fork="true" failonerror="true">
- <arg value="../domainconfig/fullapp"/>
+ <java classname="scatours.FullAppDomainLauncher" fork="true" failonerror="true">
<classpath>
- <path refid="scatours.tuscany-node-launcher"/>
+ <pathelement location="scatours-launcher-fullapp-domain.jar"/>
+ <path refid="scatours.tuscany-manifest"/>
</classpath>
</java>
</target>
@@ -165,28 +165,28 @@ </target>
<target name="run-introducing-domain">
- <java classname="org.apache.tuscany.sca.node.launcher.DomainManagerLauncher" fork="true" failonerror="true">
- <arg value="../domainconfig/introducing"/>
+ <java classname="scatours.IntroducingDomainLauncher" fork="true" failonerror="true">
<classpath>
- <path refid="scatours.tuscany-node-launcher"/>
+ <pathelement location="scatours-launcher-introducing-domain.jar"/>
+ <path refid="scatours.tuscany-manifest"/>
</classpath>
</java>
</target>
<target name="run-introducing-tours">
- <java classname="org.apache.tuscany.sca.node.launcher.NodeLauncher" fork="true" failonerror="true">
- <arg value="http://localhost:9990/node-config/ToursNode"/>
+ <java classname="scatours.IntroducingToursLauncher" fork="true" failonerror="true">
<classpath>
- <path refid="scatours.tuscany-node-launcher"/>
+ <pathelement location="scatours-launcher-introducing-tours.jar"/>
+ <path refid="scatours.tuscany-manifest"/>
</classpath>
</java>
</target>
<target name="run-introducing-trips">
- <java classname="org.apache.tuscany.sca.node.launcher.NodeLauncher" fork="true" failonerror="true">
- <arg value="http://localhost:9990/node-config/TripsNode"/>
+ <java classname="scatours.IntroducingTripsLauncher" fork="true" failonerror="true">
<classpath>
- <path refid="scatours.tuscany-node-launcher"/>
+ <pathelement location="scatours-launcher-introducing-trips.jar"/>
+ <path refid="scatours.tuscany-manifest"/>
</classpath>
</java>
</target>
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(); } } 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();
}
}
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();
}
}
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();
}
}
|