apache-tuscany/sandbox/travelsample
2010-01-22 11:20:26 +00:00
..
clients Update parent artifact name in travel sample pom.xml files 2010-01-06 21:52:11 +00:00
contrib Format the code 2009-11-05 21:14:49 +00:00
contributions Use the scatours.impl package for the TripProviderImpl class that's part of the buildingblocks contribution 2010-01-22 07:39:18 +00:00
distribution Make domain launchers run from the distribution (TUSCANY-3423) 2010-01-22 11:15:58 +00:00
domainconfig Make domain launchers run from the distribution (TUSCANY-3423) 2010-01-22 11:15:58 +00:00
launchers Delete files no longer needed as a result of commit r902059 2010-01-22 11:20:26 +00:00
services Fix name of main class 2010-01-09 09:47:02 +00:00
testdomain Update parent artifact name in travel sample pom.xml files 2010-01-06 21:52:11 +00:00
util Move the travel sample launchers/common module to util/launcher-common (TUSCANY-3422) 2010-01-13 10:12:36 +00:00
antdefs.xml Ensure required environment variables are set 2010-01-09 09:04:30 +00:00
build.xml Make domain launchers run from the distribution (TUSCANY-3423) 2010-01-22 11:15:58 +00:00
pom.xml Make domain launchers run from the distribution (TUSCANY-3423) 2010-01-22 11:15:58 +00:00
README Fix (yet another) typo 2010-01-07 09:36:38 +00:00
travel-scenario.odg Updates to indicate where initial policy examples will be. More to add. 2009-08-29 18:24:36 +00:00
travel-scenariotemplate.odg Some pictures of possible sample scenarios 2008-08-11 06:38:43 +00:00

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.
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
   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
   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
   command "ant compile".


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.
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
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.
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.


Running the travel sample from the build directories
----------------------------------------------------

The travel sample consists of a number of related scenarios.  These scenarios
are listed below, together with instructions for running them.  The instructions
in this section will work irrespective of whether the travel sample was built
using ant or maven.

Most of the scenarios are run by opening a single command prompt window
and entering the command "ant run" into that window.  If a scenario is
listed with multiple commands, this means that it needs multiple command
prompt windows.  In this case, each of the listed commands must be entered
into its own separate command prompt window in the order shown.

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
 Services: non-SCA services used in this scenario, if any
 Clients: non-SCA services 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

Directory: launchers/introducing-client
Commands: ant run-domain, ant run-trips, ant run-tours, ant run
Contributions: introducing-client, introducing-tours, introducing-trips
Launchers: introducing-domain, introducing-tours, introducing-trips

4) Interaction - Different SCA interaction styles 

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

Directory: launchers/fullapp
Command: ant run
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,
   fullapp-bespoketrip, fullapp-coordination, fullapp-currency, fullapp-packagedtrip,
   fullapp-shoppingcart, fullapp-ui, hotel, payment-java-policy, scatours,
   shoppingcart, travelcatalog, trip, tripbooking
Launchers: fullapp-domain

7) Blog feed

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

12a) SCA client

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
Contributions: currency, currency-jms
Launchers: common
Clients: currency-converter-jms

12d) RMI client

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

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

13a) SMS gateway CORBA service

Directory: launchers/notification-corba
Commands: ant run-nameserver, ant run-smsgateway, ant run 
Contributions: notification, notification-corba
Launchers: common
Services: smsgateway-corba

13b) SMS gateway EJB service

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 
Contributions: notification, notification-jms
Launchers: common
Services: smsgateway-jms

13d) SMS gateway RMI service

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

Directory: launchers/notification-ws
Commands: ant run-smsgateway, ant run 
Contributions: notification, notification-ws
Launchers: common
Services: smsgateway-jaxws


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

 java -jar <distribution-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

 java -jar <your-path>/scatours-launcher-jumpstart.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.