You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/04/18 22:51:33 UTC
svn commit: r935407 - in /tuscany/sca-java-1.x/trunk/tutorials/travelsample:
binaries/src/main/resources/ launchers/fullapp-domain/
launchers/fullapp-domain/src/main/java/scatours/
launchers/introducing-domain/ launchers/introducing-domain/src/main/jav...
Author: nash
Date: Sun Apr 18 20:51:32 2010
New Revision: 935407
URL: http://svn.apache.org/viewvc?rev=935407&view=rev
Log:
Remove usage of NodeLauncher and DomainManagerLauncher (TUSCANY-3538)
Modified:
tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml
tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-launchers.xml Sun Apr 18 20:51:32 2010
@@ -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>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/pom.xml Sun Apr 18 20:51:32 2010
@@ -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>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java Sun Apr 18 20:51:32 2010
@@ -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();
}
}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/pom.xml Sun Apr 18 20:51:32 2010
@@ -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>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainLauncher.java Sun Apr 18 20:51:32 2010
@@ -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();
}
}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/pom.xml Sun Apr 18 20:51:32 2010
@@ -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>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-tours/src/main/java/scatours/IntroducingToursLauncher.java Sun Apr 18 20:51:32 2010
@@ -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();
}
}
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/pom.xml Sun Apr 18 20:51:32 2010
@@ -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>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java?rev=935407&r1=935406&r2=935407&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-trips/src/main/java/scatours/IntroducingTripsLauncher.java Sun Apr 18 20:51:32 2010
@@ -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();
}
}