diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-05 07:31:07 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-05 07:31:07 +0000 |
commit | 9f098a95ef2ec812a13dc5b53fa4f3fa06823094 (patch) | |
tree | 60ad17c03bfc15ef983824059aeee4aa98555246 /sca-java-1.x/trunk | |
parent | 54e5bcf2afc6ab34f28459da925a552eef0f34e7 (diff) |
Remove travel sample code needed only for 1.5.1 and update README for 1.6
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@906830 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
7 files changed, 120 insertions, 190 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/README b/sca-java-1.x/trunk/tutorials/travelsample/README index 6dddce56ca..9dacfb7165 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/README +++ b/sca-java-1.x/trunk/tutorials/travelsample/README @@ -2,24 +2,20 @@ Building the travel sample using ant
------------------------------------
-1. Download and unzip JDK 1.6.0_07 or later and set the JAVA_HOME environment
- variable to the JDK base directory.
+1. Download and unzip JDK 1.6.0_07 (or later) and set the JAVA_HOME
+ environment variable to the JDK base directory.
2. Install svn and ant.
3. Create a local directory to hold the travel sample code. With this as
your current directory, check out the complete travel sample from svn
using the following command:
- svn co http://svn.apache.org/repos/asf/tuscany/sandbox/travelsample
-4. Download and unzip the Tuscany 1.5.1 (or later) binary distribution
+ svn co http://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk/tutorials/travelsample
+4. Download and unzip the Tuscany SCA Java 1.6 (or later) binary distribution
and set the TUSCANY_HOME environment variable to the base directory
containing the unzipped binary distribution.
-5. Download the tuscany-host-corba-jse and tuscany-host-corba-jse-tns
- jars from the maven repository http://repo1.maven.org/maven2 and set the
- TUSCANY_HOST_CORBA environment variable to the local directory in which
- these files are located.
-6. Download and unzip the OpenEJB 3.0 or later binary distribution and set
+5. Download and unzip the OpenEJB 3.0 (or later) binary distribution and set
the OPENEJB_HOME environment variable to the base directory containing
the unzipped binary distribution.
-7. With the travelsample directory as your current directory, enter the
+6. With the travelsample directory as your current directory, enter the
command "ant compile".
@@ -29,16 +25,17 @@ Building the travel sample using maven Most of the steps are similar to the above. For completeness, a full list
of the steps needed is given here.
-1. Download and unzip JDK 1.6.0_07 or later and set the JAVA_HOME environment
- variable to the JDK base directory.
+1. Download and unzip JDK 1.6.0_07 (or later) and set the JAVA_HOME
+ environment variable to the JDK base directory.
2. Install svn and maven.
3. Create a local directory to hold the travel sample code. With this as
your current directory, check out the complete travel sample from svn
using the following command:
- svn co http://svn.apache.org/repos/asf/tuscany/sandbox/travelsample
+ svn co http://svn.apache.org/repos/asf/tuscany/sca-java-1.x/trunk/tutorials/travelsample
4. Check the setting of the <tuscany.version> property in the
travelsample/pom.xml file. If you want to build the travel sample using
- a different Tuscany version, change this property as necessary.
+ a different Tuscany version, change this property as necessary. The
+ travel sample has been tested and runs correctly with Tuscany SCA Java 1.6.
5. With the travelsample directory as your current directory, enter the
command "mvn". You will need a live internet connection so that maven
can download any required files to your local repository.
@@ -62,23 +59,21 @@ For each scenario, the following are given: Directory: the current directory for the command prompt window or windows
Command(s): the command or commands for running the scenario
Contributions: SCA contributions used in this scenario
- Launchers: other launcher directories needed by this scenario, if any
+ Launchers: other launcher directories used in this scenario, if any
Services: non-SCA services used in this scenario, if any
- Clients: non-SCA services used in this scenario, if any
+ Clients: non-SCA clients used in this scenario, if any
1) Jumpstart - First simple example of using Tuscany
Directory: launchers/jumpstart
Command: ant run
Contributions: introducing-trips
-Launchers: common
2) Introducing - Simplified introduction to the travel application
Directory: launchers/introducing
Command: ant run
Contributions: introducing-client, introducing-tours, introducing-trips
-Launchers: common
3) Introducing (distributed) - Distributed services with a domain manager
@@ -93,7 +88,6 @@ Directory: launchers/interaction Command: ant run
Contributions: calendar, common, currency, flight, hotel, interaction-client,
interaction-service-remote, shoppingcart
-Launchers: common
5) Full application - The full interactive travel application
@@ -103,15 +97,14 @@ Contributions: car, common, creditcard-payment-jaxb-policy, currency, flight, fullapp-bespoketrip, fullapp-coordination, fullapp-currency, fullapp-packagedtrip,
fullapp-shoppingcart, fullapp-ui, hotel, payment-java-policy, scatours,
shoppingcart, travelcatalog, trip, tripbooking
-Launchers: common
6) Full application (distributed) - Distributed services with a domain manager
Directory: launchers/fullapp-nodes
Commands: ant run-domain, ant run
-Contributions: car, common, creditcard-payment-jaxb-policy, currency, flight,
+Contributions: car, common, creditcard-payment-jaxb, currency, flight,
fullapp-bespoketrip, fullapp-coordination, fullapp-currency, fullapp-packagedtrip,
- fullapp-shoppingcart, fullapp-ui, hotel, payment-java-policy, scatours,
+ fullapp-shoppingcart, fullapp-ui, hotel, payment-java, scatours,
shoppingcart, travelcatalog, trip, tripbooking
Launchers: fullapp-domain
@@ -120,35 +113,30 @@ Launchers: fullapp-domain Directory: launchers/blog-feed
Command: ant run
Contributions: blog-feed
-Launchers: common
8) Data binding
Directory: launchers/databinding
Command: ant run
Contributions: creditcard-payment-sdo, databinding-client, payment-java
-Launchers: common
9) Feed logger
Directory: launchers/feed-logger
Command: ant run
Contributions: feed-logger
-Launchers: common
10) Help pages
Directory: launchers/help-pages
Command: ant run
Contributions: help-pages
-Launchers: common
11) Policy
Directory: launchers/policy
Command: ant run
Contributions: creditcard-payment-jaxb-policy, policy-client, payment-java-policy
-Launchers: common
12) SCA currency converter service interoperating with SCA or non-SCA client
@@ -157,22 +145,19 @@ Launchers: common Directory: launchers/currency-converter
Command: ant run
Contributions: currency
-Launchers: common
12b) CORBA client
Directory: launchers/currency-converter-corba
Commands: ant run, ant run-client
Contributions: currency, currency-corba
-Launchers: common
Clients: currency-converter-corba
12c) JMS client
Directory: launchers/currency-converter-jms
-Commands: ant run-broker, ant run, ant run-client
+Commands: ant run, ant run-client
Contributions: currency, currency-jms
-Launchers: common
Clients: currency-converter-jms
12d) RMI client
@@ -180,7 +165,6 @@ Clients: currency-converter-jms Directory: launchers/currency-converter-rmi
Commands: ant run, ant run-client
Contributions: currency, currency-rmi
-Launchers: common
Clients: currency-converter-rmi
12e) JAX-WS client
@@ -188,7 +172,6 @@ Clients: currency-converter-rmi Directory: launchers/currency-converter-ws
Commands: ant run, ant run-client
Contributions: currency, currency-ws
-Launchers: common
Clients: currency-converter-ws-jaxws
13) SCA notification service interoperating with non-SCA SMS gateway service
@@ -196,9 +179,8 @@ Clients: currency-converter-ws-jaxws 13a) SMS gateway CORBA service
Directory: launchers/notification-corba
-Commands: ant run-nameserver, ant run-smsgateway, ant run
+Commands: ant run-smsgateway, ant run
Contributions: notification, notification-corba
-Launchers: common
Services: smsgateway-corba
13b) SMS gateway EJB service
@@ -206,15 +188,13 @@ Services: smsgateway-corba Directory: launchers/notification-ejb
Commands: ant run-smsgateway, ant run
Contributions: notification, notification-ejb
-Launchers: common
Services: smsgateway-ejb
13c) SMS gateway JMS service
Directory: launchers/notification-jms
-Commands: ant run-broker, ant run-smsgateway, ant run
+Commands: ant run-smsgateway, ant run
Contributions: notification, notification-jms
-Launchers: common
Services: smsgateway-jms
13d) SMS gateway RMI service
@@ -222,7 +202,6 @@ Services: smsgateway-jms Directory: launchers/notification-rmi
Commands: ant run-smsgateway, ant run
Contributions: notification, notification-rmi
-Launchers: common
Services: smsgateway-rmi
13e) SMS gateway JAX-WS service
@@ -230,7 +209,6 @@ Services: smsgateway-rmi Directory: launchers/notification-ws
Commands: ant run-smsgateway, ant run
Contributions: notification, notification-ws
-Launchers: common
Services: smsgateway-jaxws
@@ -240,16 +218,101 @@ Running the travel sample from the distribution directories If the travel sample was built using maven, a binary distribution
directory will be created containing all the built jar files together with
a "lib" directory containing a complete set of runtime dependencies for
-these jar files. The jar files in the "launchers" directory in the
-distribution output can be run using the command
+these jar files. You can run each of the scenarios from the binary
+distribution by running one or more jar files using the "java -jar" command.
+
+The jar files that you need to run for each scenario are listed below.
+If multiple jar files are listed for a scenario, they must be run in
+separate processes in the order listed. The current directory for
+the "java -jar" command must be set as follows:
+ launchers/scatours-launcher-*.jar are run from the launchers directory
+ clients/scatours-client-*.jar are run from the clients directory
+ services/scatours-service-*.jar are run from the services directory
+
+For example, to run the "jumpstart" scenario, you would set your
+current directory to the distribution "launchers" directory and run
+the command
+ java -jar scatours-launcher-jumpstart.jar
+
+Here is a complete list of the launcher commands needed to run the
+scenarios described above.
+
+ 1) Jumpstart - First simple example of using Tuscany
+ java -jar scatours-launcher-jumpstart.jar
+
+ 2) Introducing - Simplified introduction to the travel application
+ java -jar scatours-launcher-introducing.jar
+
+ 3) Introducing (distributed) - Distributed services with a domain manager
+ java -jar scatours-launcher-introducing-domain.jar
+ java -jar scatours-launcher-introducing-trips.jar
+ java -jar scatours-launcher-introducing-tours.jar
+ java -jar scatours-launcher-introducing-client.jar
- java -jar <distribution-jar>
+ 4) Interaction - Different SCA interaction styles
+ java -jar scatours-launcher-interaction.jar
-where <distrbution-jar> is the name of the jar file in the distrbution
-directory tree. For example, to run the "jumpstart" scenario, you
-would use the command
+ 5) Full application - The full interactive travel application
+ java -jar scatours-launcher-fullapp.jar
- java -jar <your-path>/scatours-launcher-jumpstart.jar
+ 6) Full application (distributed) - Distributed services with a domain manager
+ java -jar scatours-launcher-fullapp-domain.jar
+ java -jar scatours-launcher-fullapp-nodes.jar
-It isn't possible currently to run scenarios 3 and 6 (distributed execution
-with a domain manager) from the distribution directory in this way.
+ 7) Blog feed
+ java -jar scatours-launcher-blog-feed.jar
+
+ 8) Data binding
+ java -jar scatours-launcher-databinding.jar
+
+ 9) Feed logger
+ java -jar scatours-launcher-feed-logger.jar
+
+10) Help pages
+ java -jar scatours-launcher-help-pages.jar
+
+11) Policy
+ java -jar scatours-launcher-policy.jar
+
+12) SCA currency converter service interoperating with SCA or non-SCA client
+
+12a) SCA client
+ java -jar scatours-launcher-currency-converter.jar
+
+12b) CORBA client
+ java -jar scatours-launcher-currency-converter-corba.jar
+ java -jar scatours-client-currency-converter-corba.jar
+
+12c) JMS client
+ java -jar scatours-launcher-currency-converter-jms.jar
+ java -jar scatours-client-currency-converter-jms.jar
+
+12d) RMI client
+ java -jar scatours-launcher-currency-converter-rmi.jar
+ java -jar scatours-client-currency-converter-rmi.jar
+
+12e) JAX-WS client
+ java -jar scatours-launcher-currency-converter-ws.jar
+ java -jar scatours-client-currency-converter-ws-jaxws.jar
+
+13) SCA notification service interoperating with non-SCA SMS gateway service
+
+13a) SMS gateway CORBA service
+ java -jar scatours-service-smsgateway-corba.jar
+ java -jar scatours-launcher-notification-corba.jar
+
+13b) SMS gateway EJB service
+ java -jar scatours-service-smsgateway-ejb.jar
+ java -jar scatours-launcher-notification-ejb.jar
+
+13c) SMS gateway JMS service
+ java -jar scatours-service-smsgateway-jms.jar
+ java -jar scatours-launcher-notification-jms.jar
+
+13d) SMS gateway RMI service
+ java -jar scatours-service-smsgateway-rmi.jar
+ java -jar scatours-launcher-notification-rmi.jar
+
+13e) SMS gateway JAX-WS service
+ java -jar scatours-service-smsgateway-jaxws.jar
+ java -jar scatours-launcher-notification-ws.jar
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml index 20c4a3c11c..033f7072a6 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/currency-converter-corba/build.xml @@ -30,21 +30,12 @@ <ant dir="../../clients/currency-converter-corba" target="run"/>
</target>
- <!-- When running this sample, the tuscany-host-corba-jse and
- tuscany-host-corba-jse-tns jars need to be present on the classpath.
- These aren't included in tuscany-sca-manifest so they need to be
- added to the classpath explicitly. For some reason these jars aren't
- part of the Tuscany binary distribution so you'll need to download
- them from the maven repository http://repo1.maven.org/maven2 and set
- the TUSCANY_HOST_CORBA environment variable to the name of your local
- download directory. -->
<target name="run">
<java classname="scatours.CurrencyConverterCORBALauncher" fork="true">
<classpath>
<pathelement location="target/${ant.project.name}.jar"/>
<path refid="compile-path"/>
<pathelement location="${env.TUSCANY_HOME}/lib/tuscany-sca-manifest.jar"/>
- <fileset dir="${env.TUSCANY_HOST_CORBA}"/>
</classpath>
</java>
</target>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml index d294dc664a..c3bb0cc5fe 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/build.xml @@ -20,27 +20,11 @@ <project name="scatours-launcher-fullapp-domain" default="run">
<import file="../../antdefs.xml"/>
- <!-- In Tuscany 1.5.1 the command-line launcher for the domain manager
- is hard wired to use the current directory for the domain configuration,
- so we use a custom launcher to override this setting using the domain
- manager API. Note that the classpath only includes the node launcher
- jar which will bootstrap the rest of the Tuscany runtime. -->
+ <!-- The "run" target runs the DomainManagerLauncher class directly
+ (as if it had been invoked from a command line) and passes in the
+ domain configuration directory as a command-line argument. This
+ only works with Tuscany SCA Java version 1.6 and above. -->
<target name="run">
- <java classname="scatours.FullAppDomainAPILauncher" fork="true">
- <classpath>
- <pathelement location="target/${ant.project.name}.jar"/>
- <fileset dir="${env.TUSCANY_HOME}/modules">
- <include name="tuscany-node-launcher-*.jar"/>
- </fileset>
- </classpath>
- </java>
- </target>
-
- <!-- The "run-command" target runs the DomainManagerLauncher class
- directly (as if it had been invoked from a command line) and passes
- in the domain configuration directory as a command-line argument.
- This only works for Tuscany versions greater than 1.5.1. -->
- <target name="run-command">
<java classname="org.apache.tuscany.sca.node.launcher.DomainManagerLauncher"
dir="." fork="true">
<classpath>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainAPILauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainAPILauncher.java deleted file mode 100644 index 4f8d564eac..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainAPILauncher.java +++ /dev/null @@ -1,42 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package scatours;
-
-import java.io.IOException;
-import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
-
-public class FullAppDomainAPILauncher {
-
- public static void main(String[] args) throws Exception {
- DomainManagerLauncher dml = DomainManagerLauncher.newInstance();
- Object dm = dml.createDomainManager("../../domainconfig/fullapp/target/classes");
- dm.getClass().getMethod("start").invoke(dm);
-
- System.out.println("Point your browser at - http://localhost:9990/ui/home/ ");
- System.out.println("Domain started - Press enter to shutdown.");
-
- try {
- System.in.read();
- } catch (IOException e) {
- }
-
- dm.getClass().getMethod("stop").invoke(dm);
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml index 700515a791..958ba82cf3 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/build.xml @@ -20,27 +20,11 @@ <project name="scatours-launcher-introducing-domain" default="run">
<import file="../../antdefs.xml"/>
- <!-- In Tuscany 1.5.1 the command-line launcher for the domain manager
- is hard wired to use the current directory for the domain configuration,
- so we use a custom launcher to override this setting using the domain
- manager API. Note that the classpath only includes the node launcher
- jar which will bootstrap the rest of the Tuscany runtime. -->
+ <!-- The "run" target runs the DomainManagerLauncher class directly
+ (as if it had been invoked from a command line) and passes in the
+ domain configuration directory as a command-line argument. This
+ only works with Tuscany SCA Java version 1.6 and above. -->
<target name="run">
- <java classname="scatours.IntroducingDomainAPILauncher" fork="true">
- <classpath>
- <pathelement location="target/${ant.project.name}.jar"/>
- <fileset dir="${env.TUSCANY_HOME}/modules">
- <include name="tuscany-node-launcher-*.jar"/>
- </fileset>
- </classpath>
- </java>
- </target>
-
- <!-- The "run-command" target runs the DomainManagerLauncher class
- directly (as if it had been invoked from a command line) and passes
- in the domain configuration directory as a command-line argument.
- This only works for Tuscany versions greater than 1.5.1. -->
- <target name="run-command">
<java classname="org.apache.tuscany.sca.node.launcher.DomainManagerLauncher"
dir="." fork="true">
<classpath>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainAPILauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainAPILauncher.java deleted file mode 100644 index 06c5597327..0000000000 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/introducing-domain/src/main/java/scatours/IntroducingDomainAPILauncher.java +++ /dev/null @@ -1,42 +0,0 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package scatours;
-
-import java.io.IOException;
-import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
-
-public class IntroducingDomainAPILauncher {
-
- public static void main(String[] args) throws Exception {
- DomainManagerLauncher dml = DomainManagerLauncher.newInstance();
- Object dm = dml.createDomainManager("../../domainconfig/introducing/target/classes");
- dm.getClass().getMethod("start").invoke(dm);
-
- System.out.println("Point your browser at - http://localhost:9990/ui/home/ ");
- System.out.println("Domain started - Press enter to shutdown.");
-
- try {
- System.in.read();
- } catch (IOException e) {
- }
-
- dm.getClass().getMethod("stop").invoke(dm);
- }
-}
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml index 922545e48e..501bbe2ab4 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-corba/build.xml @@ -29,20 +29,12 @@ <ant dir="../../services/smsgateway-corba" target="run"/>
</target>
- <!-- When running this sample, the tuscany-host-corba-jse jar needs to be
- present on the classpath. This isn't included in tuscany-sca-manifest
- so it needs to be added to the classpath explicitly. For some reason
- this jar isn't part of the Tuscany binary distribution so you'll need
- to download it from the maven repository http://repo1.maven.org/maven2
- and set the TUSCANY_HOST_CORBA environment variable to the name of
- your local download directory. -->
<target name="run">
<java classname="scatours.NotificationCORBALauncher" fork="true">
<classpath>
<pathelement location="target/${ant.project.name}.jar"/>
<path refid="compile-path"/>
<pathelement location="${env.TUSCANY_HOME}/lib/tuscany-sca-manifest.jar"/>
- <fileset dir="${env.TUSCANY_HOST_CORBA}"/>
</classpath>
</java>
</target>
|