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/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 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. 6. 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/sca-java-1.x/trunk/tutorials/travelsample 4. Check the setting of the 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. 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. 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 used in this scenario, if any Services: 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 2) Introducing - Simplified introduction to the travel application Directory: launchers/introducing Command: ant run Contributions: introducing-client, introducing-tours, introducing-trips 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 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 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, currency, flight, fullapp-bespoketrip, fullapp-coordination, fullapp-currency, fullapp-packagedtrip, fullapp-shoppingcart, fullapp-ui, hotel, payment-java, scatours, shoppingcart, travelcatalog, trip, tripbooking Launchers: fullapp-domain 7) Building blocks - Using SCA composites as application building blocks Directory: launchers/buildingblocks Commands: ant run Contributions: buildingblocks, buildingblocks-client, introducing-trips 8) Blog feed Directory: launchers/blog-feed Command: ant run Contributions: blog-feed 9) Data binding Directory: launchers/databinding Command: ant run Contributions: creditcard-payment-sdo, databinding-client, payment-java 10) Feed logger Directory: launchers/feed-logger Command: ant run Contributions: feed-logger 11) Help pages Directory: launchers/help-pages Command: ant run Contributions: help-pages 12) Policy Directory: launchers/policy Command: ant run Contributions: creditcard-payment-jaxb-policy, policy-client, payment-java-policy 13) Payment service with different implementation types 13a) implementation.bpel Directory: launchers/payment-bpel Command: ant run Contributions: payment-bpel, creditcard-payment-jaxb, emailgateway 13b) implementation.script written in Groovy Directory: launchers/payment-groovy Command: ant run Contributions: payment-groovy, creditcard-payment-jaxb, emailgateway 13c) implementation.java Directory: launchers/payment-java Command: ant run Contributions: payment-java, creditcard-payment-jaxb 13d) implementation.java with policy Directory: launchers/payment-java-policy Command: ant run Contributions: payment-java-policy, creditcard-payment-jaxb-policy 13e) implementation.spring Directory: launchers/payment-spring Command: ant run Contributions: payment-spring, creditcard-payment-jaxb 13f) implementation.spring with SCA tags Directory: launchers/payment-spring-scatag Command: ant run Contributions: payment-spring-scatag, creditcard-payment-jaxb 14) SCA currency converter service interoperating with SCA or non-SCA client 14a) SCA client Directory: launchers/currency-converter Command: ant run Contributions: currency 14b) CORBA client Directory: launchers/currency-converter-corba Commands: ant run, ant run-client Contributions: currency, currency-corba Clients: currency-converter-corba 14c) JMS client Directory: launchers/currency-converter-jms Commands: ant run, ant run-client Contributions: currency, currency-jms Clients: currency-converter-jms 14d) RMI client Directory: launchers/currency-converter-rmi Commands: ant run, ant run-client Contributions: currency, currency-rmi Clients: currency-converter-rmi 14e) JAX-WS client Directory: launchers/currency-converter-ws Commands: ant run, ant run-client Contributions: currency, currency-ws Clients: currency-converter-ws-jaxws 15) SCA notification service interoperating with non-SCA SMS gateway service 15a) SMS gateway CORBA service Directory: launchers/notification-corba Commands: ant run-smsgateway, ant run Contributions: notification, notification-corba Services: smsgateway-corba 15b) SMS gateway EJB service Directory: launchers/notification-ejb Commands: ant run-smsgateway, ant run Contributions: notification, notification-ejb Services: smsgateway-ejb 15c) SMS gateway JMS service Directory: launchers/notification-jms Commands: ant run-smsgateway, ant run Contributions: notification, notification-jms Services: smsgateway-jms 15d) SMS gateway RMI service Directory: launchers/notification-rmi Commands: ant run-smsgateway, ant run Contributions: notification, notification-rmi Services: smsgateway-rmi 15e) SMS gateway JAX-WS service Directory: launchers/notification-ws Commands: ant run-smsgateway, ant run Contributions: notification, notification-ws 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. 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 4) Interaction - Different SCA interaction styles java -jar scatours-launcher-interaction.jar 5) Full application - The full interactive travel application java -jar scatours-launcher-fullapp.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 7) Building blocks - Using SCA composites as application building blocks java -jar scatours-launcher-buildingblocks.jar 8) Blog feed java -jar scatours-launcher-blog-feed.jar 9) Data binding java -jar scatours-launcher-databinding.jar 10) Feed logger java -jar scatours-launcher-feed-logger.jar 11) Help pages java -jar scatours-launcher-help-pages.jar 12) Policy java -jar scatours-launcher-policy.jar 13) Payment service with different implementation types 13a) implementation.bpel java -jar scatours-launcher-payment-bpel.jar 13b) implementation.script written in Groovy java -jar scatours-launcher-payment-groovy.jar 13c) implementation.java java -jar scatours-launcher-payment-java.jar 13d) implementation.java with policy java -jar scatours-launcher-payment-java-policy.jar 13e) implementation.spring java -jar scatours-launcher-payment-spring.jar 13f) implementation.spring with SCA tags java -jar scatours-launcher-payment-spring-scatag.jar 14) SCA currency converter service interoperating with SCA or non-SCA client 14a) SCA client java -jar scatours-launcher-currency-converter.jar 14b) CORBA client java -jar scatours-launcher-currency-converter-corba.jar java -jar scatours-client-currency-converter-corba.jar 14c) JMS client java -jar scatours-launcher-currency-converter-jms.jar java -jar scatours-client-currency-converter-jms.jar 14d) RMI client java -jar scatours-launcher-currency-converter-rmi.jar java -jar scatours-client-currency-converter-rmi.jar 14e) JAX-WS client java -jar scatours-launcher-currency-converter-ws.jar java -jar scatours-client-currency-converter-ws-jaxws.jar 15) SCA notification service interoperating with non-SCA SMS gateway service 15a) SMS gateway CORBA service java -jar scatours-service-smsgateway-corba.jar java -jar scatours-launcher-notification-corba.jar 15b) SMS gateway EJB service java -jar scatours-service-smsgateway-ejb.jar java -jar scatours-launcher-notification-ejb.jar 15c) SMS gateway JMS service java -jar scatours-service-smsgateway-jms.jar java -jar scatours-launcher-notification-jms.jar 15d) SMS gateway RMI service java -jar scatours-service-smsgateway-rmi.jar java -jar scatours-launcher-notification-rmi.jar 15e) SMS gateway JAX-WS service java -jar scatours-service-smsgateway-jaxws.jar java -jar scatours-launcher-notification-ws.jar Cross-reference of contributions to scenarios --------------------------------------------- The following table shows which contributions are used in which scenarios. contributions/blog-feed 8 contributions/buildingblocks 7 contributions/buildingblocks-client 7 contributions/calendar 4 contributions/car 5, 6 contributions/common 4, 5, 6 contributions/creditcard-payment-jaxb 6, 13a, 13b, 13c, 13e, 13f contributions/creditcard-payment-jaxb-policy 5, 12, 13d contributions/creditcard-payment-sdo 9 contributions/creditcard-payment-webapp **not used** contributions/currency 4, 5, 6, 14a, 14b, 14c, 14d contributions/currency-corba 14b contributions/currency-jms 14c contributions/currency-jsp **not used** contributions/currency-rmi 14d contributions/currency-servlet **not used** contributions/currency-ws 14e contributions/databinding-client 9 contributions/emailgateway 13a, 13b contributions/feed-logger 10 contributions/flight 4, 5, 6 contributions/fullapp-bespoketrip 5, 6 contributions/fullapp-coordination 5, 6 contributions/fullapp-currency 5, 6 contributions/fullapp-packagedtrip 5, 6 contributions/fullapp-shoppingcart 5, 6 contributions/fullapp-ui 5, 6 contributions/help-pages 11 contributions/hotel 5, 6 contributions/interaction-client 4 contributions/interaction-service-remote 4 contributions/introducing-client 2, 3 contributions/introducing-tours 2, 3 contributions/introducing-trips 1, 2, 3, 7 contributions/notification 15a, 15b, 15c, 15d contributions/notification-corba 15a contributions/notification-ejb 15b contributions/notification-jms 15c contributions/notification-rmi 15d contributions/payment-bpel 13a contributions/payment-groovy 13b contributions/payment-java 6, 9, 13c contributions/payment-java-policy 5, 12, 13d contributions/payment-spring 13e contributions/payment-spring-policy **not used** contributions/payment-spring-scatag 13f contributions/policy-client 12 contributions/scatours 5, 6 contributions/shoppingcart 4, 5, 6 contributions/travelcatalog 5, 6 contributions/trip 5, 6 contributions/tripbooking 5, 6