From 1a782a0069143286e9e386c628cd4e58c3b51e46 Mon Sep 17 00:00:00 2001 From: nash Date: Sat, 2 Jan 2010 09:24:41 +0000 Subject: Add/fix ant scripts for contents of travel sample services and launchers directories (TUSCANY-3398) git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@895152 13f79535-47bb-0310-9956-ffa450edef68 --- sandbox/travelsample/antdefs.xml | 136 +++++++++++++++++---- sandbox/travelsample/build.xml | 49 ++++++++ sandbox/travelsample/clients/pom.xml | 2 +- .../contributions/payment-bpel/build.xml | 2 +- sandbox/travelsample/contributions/pom.xml | 2 +- sandbox/travelsample/contributions/trip/build.xml | 4 +- sandbox/travelsample/distribution/pom.xml | 2 +- sandbox/travelsample/launchers/blog-feed/build.xml | 27 ++-- sandbox/travelsample/launchers/build.xml | 67 ++++++++++ sandbox/travelsample/launchers/common/build.xml | 22 ++++ .../launchers/currency-converter-corba/build.xml | 38 +++--- .../launchers/currency-converter-jms/build.xml | 34 ++---- .../launchers/currency-converter-rmi/build.xml | 27 ++-- .../launchers/currency-converter-ws/build.xml | 27 ++-- .../launchers/currency-converter/build.xml | 27 ++-- .../travelsample/launchers/databinding/build.xml | 27 ++-- .../travelsample/launchers/feed-logger/build.xml | 27 ++-- .../launchers/fullapp-domain/build.xml | 33 +++-- .../main/java/scatours/FullAppDomainLauncher.java | 1 + .../travelsample/launchers/fullapp-nodes/build.xml | 30 +---- sandbox/travelsample/launchers/fullapp/build.xml | 35 ++---- .../travelsample/launchers/help-pages/build.xml | 27 ++-- .../travelsample/launchers/interaction/build.xml | 27 ++-- .../launchers/introducing-client/build.xml | 23 +--- .../launchers/introducing-domain/build.xml | 13 +- .../launchers/introducing-tours/build.xml | 5 +- .../launchers/introducing-trips/build.xml | 5 +- .../travelsample/launchers/introducing/build.xml | 27 ++-- sandbox/travelsample/launchers/jumpstart/build.xml | 32 ++--- .../launchers/notification-corba/build.xml | 47 ++++--- .../launchers/notification-ejb/build.xml | 30 ++--- .../launchers/notification-jms/build.xml | 40 +++--- .../src/main/java/scatours/JMSBrokerLauncher.java | 38 ------ .../launchers/notification-rmi/build.xml | 29 ++--- .../com/tuscanyscatours/smsgateway/SMSGateway.java | 30 +++++ .../launchers/notification-ws/build.xml | 27 ++-- sandbox/travelsample/launchers/policy/build.xml | 27 ++-- sandbox/travelsample/launchers/pom.xml | 2 +- sandbox/travelsample/pom.xml | 4 +- sandbox/travelsample/services/build.xml | 49 ++++++++ .../services/creditcard-payment-jaxws/build.xml | 29 +---- sandbox/travelsample/services/pom.xml | 2 +- .../services/smsgateway-corba/build.xml | 38 +++--- .../travelsample/services/smsgateway-ejb/build.xml | 28 ++--- .../com/tuscanyscatours/smsgateway/SMSGateway.java | 30 +++++ .../smsgateway/SMSGatewayEJBServiceBootstrap.java | 45 +++++++ .../tuscanyscatours/smsgateway/SMSGatewayImpl.java | 33 +++++ .../main/java/scatours/smsgateway/SMSGateway.java | 30 ----- .../smsgateway/SMSGatewayEJBServiceBootstrap.java | 45 ------- .../java/scatours/smsgateway/SMSGatewayImpl.java | 33 ----- .../services/smsgateway-jaxws/build.xml | 27 +--- .../smsgateway/SMSGatewayServiceBootstrap.java | 2 +- .../travelsample/services/smsgateway-jms/build.xml | 31 +++-- .../src/main/java/scatours/JMSBrokerLauncher.java | 38 ++++++ .../smsgateway/SMSGatewayJMSServiceBootstrap.java | 1 + .../travelsample/services/smsgateway-rmi/build.xml | 28 +---- .../com/tuscanyscatours/smsgateway/SMSGateway.java | 30 +++++ .../tuscanyscatours/smsgateway/SMSGatewayImpl.java | 39 ++++++ .../smsgateway/SMSGatewayRMIServiceBootstrap.java | 40 ++++++ .../main/java/scatours/smsgateway/SMSGateway.java | 30 ----- .../java/scatours/smsgateway/SMSGatewayImpl.java | 39 ------ .../smsgateway/SMSGatewayRMIServiceBootstrap.java | 40 ------ sandbox/travelsample/testdomain/build.xml | 4 +- 63 files changed, 873 insertions(+), 890 deletions(-) create mode 100644 sandbox/travelsample/build.xml create mode 100644 sandbox/travelsample/launchers/build.xml create mode 100644 sandbox/travelsample/launchers/common/build.xml delete mode 100644 sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/JMSBrokerLauncher.java create mode 100644 sandbox/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java create mode 100644 sandbox/travelsample/services/build.xml create mode 100644 sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java create mode 100644 sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java create mode 100644 sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java delete mode 100644 sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGateway.java delete mode 100644 sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayEJBServiceBootstrap.java delete mode 100644 sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayImpl.java create mode 100644 sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/JMSBrokerLauncher.java create mode 100644 sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java create mode 100644 sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java create mode 100644 sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java delete mode 100644 sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGateway.java delete mode 100644 sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayImpl.java delete mode 100644 sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayRMIServiceBootstrap.java (limited to 'sandbox/travelsample') diff --git a/sandbox/travelsample/antdefs.xml b/sandbox/travelsample/antdefs.xml index 92bd5e0425..00d69133ea 100644 --- a/sandbox/travelsample/antdefs.xml +++ b/sandbox/travelsample/antdefs.xml @@ -29,47 +29,62 @@ TUSCANY_HOME A directory containing the Tuscany binary distribution. JUNIT_JAR The location of the JUnit jar file. The JUnit version used for testing these build files was JUnit 4.5. + TUSCANY_HOST_CORBA (only needed to run CORBA services) A directory + containing the Tuscany JSE CORBA host jars. This file defines the following targets that can be used on the ant command that invokes the build.xml file: - Compiles any Java source files that don't have an up-to-date + "compile" Compiles any Java source files that don't have an up-to-date class file, and copies any files in or under the resource directory. If the build.xml file contains a element with the id "compile-path", the contents of this path are added to the compiler's classpath. Also invokes the following targets: - . (defined in the build.xml file) if there are any + . "wsdljava" (defined in the build.xml file) if there are any .wsdl files in or under the resource directory - . if there are any files in or under the src/test/java + . "idljava" (defined in the build.xml file) if there are any + .idl files in or under the resource directory + . "test" if there are any files in or under the src/test/java directory - . if all previous steps completed successfully - Compiles any Java unit test files that don't have an - up-to-date class file, copies any test resources in or under - the src/test/resources directory, and runs the unit tests. - If the build.xml file contains a element with the id - "test-path", the contents of this path are added to the unit test - classpath. If the build.xml file defines the "test-setup" property, - the target in the build.xml file is invoked after - copying the test resources. - Creates a jar file containing the compiled Java class + . "package" if all previous steps completed successfully + "test" Compiles any Java unit test files that don't have an + up-to-date class file, copies any test resources in or under the + src/test/resources directory, and runs the unit tests. If the + build.xml file contains a element with the id "test-path", + the contents of this path are used for compiling and running the + unit tests. In addition, the "compile-path" setting (if specified) + is used for running unit tests. If the build.xml file defines the + "test-setup" property, the "testsetup" target in the build.xml + file is invoked after copying the test resources. + "package" Creates a jar file containing the compiled Java class files (excluding unit test code) and any files in or under the resource directory, unless the jar file is already up to date. - Deletes all the files produced by the build. + If the build.xml file defines a path with id "package-path", this + path is used for the Class-Path manifest entry. + "run" Runs the class specified by the "run-class" property in the + build.xml file if this property is defined. If the build.xml file + contains a element with id "run-path", the contents of this + path are added to the run classpath. + "clean" Deletes all the files produced by the build. This file also defines the following targets for invocation by - within the target in the build.xml file: - Generates Java code from a WSDL file (unless the Java + from the build.xml file: + "wsimport" Generates Java code from a WSDL file (unless the Java code is already up to date) by running the JDK wsimport command. Requires the following parameters: . the Java package to use for generated code . the filename of the WSDL file . the filename of any Java class file that will be - generated by running wsimport on the WSDL file - Generates Java code from a WSDL file (unless the Java + generated by running this target on the WSDL file + "sdojavagen" Generates Java code from a WSDL file (unless the Java code is already up to date) by running the SDO XSD2JavaGenerator. Requires the same parameters as , plus the following: . the prefix string for naming the generated factory - The build.xml file can make any number of calls to and/or - . + "idlj" Generates Java code from a CORBA IDL file (unless the Java + code is already up to date) by running the JDK idlj command. + Requires the following parameters: + . the filename of the IDL file + . the filename of any Java class file that will be + generated by running this target for this IDL file All other targets defined by this file (with names starting with "#") are for internal use from within this file and are not intended to @@ -140,6 +155,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -239,7 +291,7 @@ - + @@ -262,13 +314,14 @@ - + - + + @@ -309,14 +362,42 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -341,7 +422,10 @@ - + + + + diff --git a/sandbox/travelsample/build.xml b/sandbox/travelsample/build.xml new file mode 100644 index 0000000000..1555d9ad68 --- /dev/null +++ b/sandbox/travelsample/build.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/clients/pom.xml b/sandbox/travelsample/clients/pom.xml index 5b6a2a5d0b..177da15528 100644 --- a/sandbox/travelsample/clients/pom.xml +++ b/sandbox/travelsample/clients/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-scatours + scatours 1.0-SNAPSHOT ../pom.xml diff --git a/sandbox/travelsample/contributions/payment-bpel/build.xml b/sandbox/travelsample/contributions/payment-bpel/build.xml index 90de52dff3..29e317cf4d 100644 --- a/sandbox/travelsample/contributions/payment-bpel/build.xml +++ b/sandbox/travelsample/contributions/payment-bpel/build.xml @@ -39,7 +39,7 @@ - + diff --git a/sandbox/travelsample/contributions/pom.xml b/sandbox/travelsample/contributions/pom.xml index c6ece86582..46699143fb 100644 --- a/sandbox/travelsample/contributions/pom.xml +++ b/sandbox/travelsample/contributions/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-scatours + scatours 1.0-SNAPSHOT ../pom.xml diff --git a/sandbox/travelsample/contributions/trip/build.xml b/sandbox/travelsample/contributions/trip/build.xml index 5731831892..6e48af3cf8 100644 --- a/sandbox/travelsample/contributions/trip/build.xml +++ b/sandbox/travelsample/contributions/trip/build.xml @@ -22,7 +22,5 @@ - - - + diff --git a/sandbox/travelsample/distribution/pom.xml b/sandbox/travelsample/distribution/pom.xml index 774cd70f15..614f49b958 100644 --- a/sandbox/travelsample/distribution/pom.xml +++ b/sandbox/travelsample/distribution/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-scatours + scatours 1.0-SNAPSHOT ../pom.xml diff --git a/sandbox/travelsample/launchers/blog-feed/build.xml b/sandbox/travelsample/launchers/blog-feed/build.xml index d243ed2dba..fff8bc212f 100644 --- a/sandbox/travelsample/launchers/blog-feed/build.xml +++ b/sandbox/travelsample/launchers/blog-feed/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/build.xml b/sandbox/travelsample/launchers/build.xml new file mode 100644 index 0000000000..b080b2c473 --- /dev/null +++ b/sandbox/travelsample/launchers/build.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/launchers/common/build.xml b/sandbox/travelsample/launchers/common/build.xml new file mode 100644 index 0000000000..c56323c786 --- /dev/null +++ b/sandbox/travelsample/launchers/common/build.xml @@ -0,0 +1,22 @@ + + + + + diff --git a/sandbox/travelsample/launchers/currency-converter-corba/build.xml b/sandbox/travelsample/launchers/currency-converter-corba/build.xml index 1dca0a680d..36012e293a 100644 --- a/sandbox/travelsample/launchers/currency-converter-corba/build.xml +++ b/sandbox/travelsample/launchers/currency-converter-corba/build.xml @@ -18,33 +18,27 @@ --> - - - - - - - - - - - + + + + + + - - - - + + + - - - - - - - diff --git a/sandbox/travelsample/launchers/currency-converter-jms/build.xml b/sandbox/travelsample/launchers/currency-converter-jms/build.xml index d5db4633a3..264e028dd1 100644 --- a/sandbox/travelsample/launchers/currency-converter-jms/build.xml +++ b/sandbox/travelsample/launchers/currency-converter-jms/build.xml @@ -18,23 +18,20 @@ --> - - - - - - - - - - - + + + + + + - - + + + @@ -42,16 +39,9 @@ - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/currency-converter-rmi/build.xml b/sandbox/travelsample/launchers/currency-converter-rmi/build.xml index 1d2fc52a26..814ed9a053 100644 --- a/sandbox/travelsample/launchers/currency-converter-rmi/build.xml +++ b/sandbox/travelsample/launchers/currency-converter-rmi/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/currency-converter-ws/build.xml b/sandbox/travelsample/launchers/currency-converter-ws/build.xml index 2fc1b8caf5..f4b21d0b55 100644 --- a/sandbox/travelsample/launchers/currency-converter-ws/build.xml +++ b/sandbox/travelsample/launchers/currency-converter-ws/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/currency-converter/build.xml b/sandbox/travelsample/launchers/currency-converter/build.xml index 7f1e5646d5..6b0f17f2db 100644 --- a/sandbox/travelsample/launchers/currency-converter/build.xml +++ b/sandbox/travelsample/launchers/currency-converter/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/databinding/build.xml b/sandbox/travelsample/launchers/databinding/build.xml index 5c1e4a1eea..3d80a6ca68 100644 --- a/sandbox/travelsample/launchers/databinding/build.xml +++ b/sandbox/travelsample/launchers/databinding/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/feed-logger/build.xml b/sandbox/travelsample/launchers/feed-logger/build.xml index e772c2f67a..e6bca9c15d 100644 --- a/sandbox/travelsample/launchers/feed-logger/build.xml +++ b/sandbox/travelsample/launchers/feed-logger/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/fullapp-domain/build.xml b/sandbox/travelsample/launchers/fullapp-domain/build.xml index 92957b88ab..1befc6413f 100644 --- a/sandbox/travelsample/launchers/fullapp-domain/build.xml +++ b/sandbox/travelsample/launchers/fullapp-domain/build.xml @@ -18,20 +18,37 @@ --> - + + - + - + + + + - - - + + + + + + + + + + - diff --git a/sandbox/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java b/sandbox/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java index 8dfbc947c8..21b0ae4cb3 100644 --- a/sandbox/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java +++ b/sandbox/travelsample/launchers/fullapp-domain/src/main/java/scatours/FullAppDomainLauncher.java @@ -39,5 +39,6 @@ public class FullAppDomainLauncher { } catch (IOException e) { } + dm.getClass().getMethod("stop").invoke(dm); } } diff --git a/sandbox/travelsample/launchers/fullapp-nodes/build.xml b/sandbox/travelsample/launchers/fullapp-nodes/build.xml index c34d22faad..14a483b564 100644 --- a/sandbox/travelsample/launchers/fullapp-nodes/build.xml +++ b/sandbox/travelsample/launchers/fullapp-nodes/build.xml @@ -17,37 +17,15 @@ * under the License. --> - - - - - - - - - - - - - - - - - + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/fullapp/build.xml b/sandbox/travelsample/launchers/fullapp/build.xml index 8061df32e3..d6e7e18dbb 100644 --- a/sandbox/travelsample/launchers/fullapp/build.xml +++ b/sandbox/travelsample/launchers/fullapp/build.xml @@ -18,39 +18,18 @@ --> - - - - - - - - - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/help-pages/build.xml b/sandbox/travelsample/launchers/help-pages/build.xml index 2bbb462dca..3f83d64e22 100644 --- a/sandbox/travelsample/launchers/help-pages/build.xml +++ b/sandbox/travelsample/launchers/help-pages/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/interaction/build.xml b/sandbox/travelsample/launchers/interaction/build.xml index 5a9591b712..e00596f636 100644 --- a/sandbox/travelsample/launchers/interaction/build.xml +++ b/sandbox/travelsample/launchers/interaction/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/introducing-client/build.xml b/sandbox/travelsample/launchers/introducing-client/build.xml index 51444507a8..4cd4a902f8 100644 --- a/sandbox/travelsample/launchers/introducing-client/build.xml +++ b/sandbox/travelsample/launchers/introducing-client/build.xml @@ -18,31 +18,14 @@ --> - - - - - - - - - - - + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/introducing-domain/build.xml b/sandbox/travelsample/launchers/introducing-domain/build.xml index 55334cf658..67d5fab24c 100644 --- a/sandbox/travelsample/launchers/introducing-domain/build.xml +++ b/sandbox/travelsample/launchers/introducing-domain/build.xml @@ -18,19 +18,16 @@ --> - + - + - + + + - - - - - diff --git a/sandbox/travelsample/launchers/introducing-tours/build.xml b/sandbox/travelsample/launchers/introducing-tours/build.xml index 2a2d774177..12482cf7b8 100644 --- a/sandbox/travelsample/launchers/introducing-tours/build.xml +++ b/sandbox/travelsample/launchers/introducing-tours/build.xml @@ -24,9 +24,10 @@ - + + + - diff --git a/sandbox/travelsample/launchers/introducing-trips/build.xml b/sandbox/travelsample/launchers/introducing-trips/build.xml index d0a9623966..463831c948 100644 --- a/sandbox/travelsample/launchers/introducing-trips/build.xml +++ b/sandbox/travelsample/launchers/introducing-trips/build.xml @@ -24,9 +24,10 @@ - + + + - diff --git a/sandbox/travelsample/launchers/introducing/build.xml b/sandbox/travelsample/launchers/introducing/build.xml index 7cf57f6217..3e3e839610 100644 --- a/sandbox/travelsample/launchers/introducing/build.xml +++ b/sandbox/travelsample/launchers/introducing/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/jumpstart/build.xml b/sandbox/travelsample/launchers/jumpstart/build.xml index 36de2730b2..fdfc12c92d 100644 --- a/sandbox/travelsample/launchers/jumpstart/build.xml +++ b/sandbox/travelsample/launchers/jumpstart/build.xml @@ -18,36 +18,18 @@ --> - - - - - - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/notification-corba/build.xml b/sandbox/travelsample/launchers/notification-corba/build.xml index b931f708d1..152918616a 100644 --- a/sandbox/travelsample/launchers/notification-corba/build.xml +++ b/sandbox/travelsample/launchers/notification-corba/build.xml @@ -18,39 +18,36 @@ --> - - - - - - - - - - - + + + + + + - - - - + + + + + - - - + + + - - - - - - - diff --git a/sandbox/travelsample/launchers/notification-ejb/build.xml b/sandbox/travelsample/launchers/notification-ejb/build.xml index 27d9ab92cd..cc7e8466d8 100644 --- a/sandbox/travelsample/launchers/notification-ejb/build.xml +++ b/sandbox/travelsample/launchers/notification-ejb/build.xml @@ -18,31 +18,25 @@ --> - + + + + + - - - - - - - - + + + - - + + + - - - - - - - diff --git a/sandbox/travelsample/launchers/notification-jms/build.xml b/sandbox/travelsample/launchers/notification-jms/build.xml index 1a0130aa82..0c1c4d2063 100644 --- a/sandbox/travelsample/launchers/notification-jms/build.xml +++ b/sandbox/travelsample/launchers/notification-jms/build.xml @@ -18,40 +18,28 @@ --> - - - - - - - - - - - + + + + + + - - - - - - + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/JMSBrokerLauncher.java b/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/JMSBrokerLauncher.java deleted file mode 100644 index 929eb78431..0000000000 --- a/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/JMSBrokerLauncher.java +++ /dev/null @@ -1,38 +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 org.apache.activemq.broker.BrokerService; - -public class JMSBrokerLauncher { - - public static void main(String[] args) throws Exception { - final BrokerService jmsBroker = new BrokerService(); - jmsBroker.setPersistent(false); - jmsBroker.setUseJmx(false); - jmsBroker.addConnector("tcp://localhost:61619"); - jmsBroker.start(); - - System.out.println("JMS Message Broker started"); - System.out.println("Press enter to shutdown."); - System.in.read(); - - jmsBroker.stop(); - } -} diff --git a/sandbox/travelsample/launchers/notification-rmi/build.xml b/sandbox/travelsample/launchers/notification-rmi/build.xml index 70b5b18f77..addffd998e 100644 --- a/sandbox/travelsample/launchers/notification-rmi/build.xml +++ b/sandbox/travelsample/launchers/notification-rmi/build.xml @@ -18,31 +18,24 @@ --> - + + + + + - - - - - - - - + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java b/sandbox/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java new file mode 100644 index 0000000000..4ce528fd23 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java @@ -0,0 +1,30 @@ +/* + * 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 com.tuscanyscatours.smsgateway; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +/** + * A gateway to send SMS messages. + */ +public interface SMSGateway extends Remote { + boolean sendSMS(String fromNumber, String toNumber, String text) throws RemoteException; +} diff --git a/sandbox/travelsample/launchers/notification-ws/build.xml b/sandbox/travelsample/launchers/notification-ws/build.xml index 8be5783cb3..dff087b710 100644 --- a/sandbox/travelsample/launchers/notification-ws/build.xml +++ b/sandbox/travelsample/launchers/notification-ws/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/policy/build.xml b/sandbox/travelsample/launchers/policy/build.xml index ec8155b871..2e670f6983 100644 --- a/sandbox/travelsample/launchers/policy/build.xml +++ b/sandbox/travelsample/launchers/policy/build.xml @@ -18,31 +18,18 @@ --> - - - - - - - - - - - + + + + + - - + + - - - - - - - diff --git a/sandbox/travelsample/launchers/pom.xml b/sandbox/travelsample/launchers/pom.xml index a6191b4089..2e23f03b30 100644 --- a/sandbox/travelsample/launchers/pom.xml +++ b/sandbox/travelsample/launchers/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-scatours + scatours 1.0-SNAPSHOT ../pom.xml diff --git a/sandbox/travelsample/pom.xml b/sandbox/travelsample/pom.xml index cae4ff4542..35a63d0929 100644 --- a/sandbox/travelsample/pom.xml +++ b/sandbox/travelsample/pom.xml @@ -24,10 +24,10 @@ tuscany-sca 1.6-SNAPSHOT - tuscany-scatours + scatours pom 1.0-SNAPSHOT - Apache Tuscany SCA Tours Assembly Examples + Apache Tuscany SCA Tours Travel Sample diff --git a/sandbox/travelsample/services/build.xml b/sandbox/travelsample/services/build.xml new file mode 100644 index 0000000000..21b282707c --- /dev/null +++ b/sandbox/travelsample/services/build.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/services/creditcard-payment-jaxws/build.xml b/sandbox/travelsample/services/creditcard-payment-jaxws/build.xml index 086f13825c..515df819c3 100644 --- a/sandbox/travelsample/services/creditcard-payment-jaxws/build.xml +++ b/sandbox/travelsample/services/creditcard-payment-jaxws/build.xml @@ -18,31 +18,14 @@ --> - - - - - - - - - - - + + - - - - - + + - - - - - - - diff --git a/sandbox/travelsample/services/pom.xml b/sandbox/travelsample/services/pom.xml index f625fe5e8e..0c8812cffd 100644 --- a/sandbox/travelsample/services/pom.xml +++ b/sandbox/travelsample/services/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-scatours + scatours 1.0-SNAPSHOT ../pom.xml diff --git a/sandbox/travelsample/services/smsgateway-corba/build.xml b/sandbox/travelsample/services/smsgateway-corba/build.xml index ae2939131c..b56445a129 100644 --- a/sandbox/travelsample/services/smsgateway-corba/build.xml +++ b/sandbox/travelsample/services/smsgateway-corba/build.xml @@ -18,31 +18,27 @@ --> - + - - - - - - - - + + + + + - - - - - - - + + + + + + - - - - + + + + - diff --git a/sandbox/travelsample/services/smsgateway-ejb/build.xml b/sandbox/travelsample/services/smsgateway-ejb/build.xml index 36630cedee..cd08a865dc 100644 --- a/sandbox/travelsample/services/smsgateway-ejb/build.xml +++ b/sandbox/travelsample/services/smsgateway-ejb/build.xml @@ -18,31 +18,17 @@ --> - - - - - - - - - - - + + - + - - + + - - - - - - - diff --git a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java new file mode 100644 index 0000000000..b462dd1be8 --- /dev/null +++ b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java @@ -0,0 +1,30 @@ +/* + * 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 com.tuscanyscatours.smsgateway; + +import javax.ejb.Remote; + +/** + * A gateway to send SMS messages. + */ +@Remote +public interface SMSGateway { + boolean sendSMS(String fromNumber, String toNumber, String text); +} diff --git a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java new file mode 100644 index 0000000000..4da784bc55 --- /dev/null +++ b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayEJBServiceBootstrap.java @@ -0,0 +1,45 @@ +/* + * 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 com.tuscanyscatours.smsgateway; + +import java.util.Properties; + +import javax.naming.Context; +import javax.naming.InitialContext; + +public class SMSGatewayEJBServiceBootstrap { + + public static void main(String[] args) throws Exception { + System.out.println("Publishing SMS Gateway Service as an EJB service"); + + Properties properties = new Properties(); + properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory"); + properties.setProperty("openejb.embedded.remotable", "true"); + + InitialContext initialContext = new InitialContext(properties); + + // Object object = initialContext.lookup("SMSGatewayImplRemote"); + // SMSGateway smsGateway = (SMSGateway) object; + // smsGateway.sendSMS("From", "to", "Message"); + + System.out.println("EJB server running - waiting for requests"); + System.out.println("Press enter to shutdown."); + System.in.read(); + } +} diff --git a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java new file mode 100644 index 0000000000..3bdf48a7ea --- /dev/null +++ b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java @@ -0,0 +1,33 @@ +/* + * 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 com.tuscanyscatours.smsgateway; + +import javax.ejb.Stateless; + +@Stateless +public class SMSGatewayImpl implements SMSGateway { + + public boolean sendSMS(String fromNumber, String toNumber, String text) { + System.out.println("Sending SMS message"); + System.out.println("From: " + fromNumber); + System.out.println("To: " + toNumber); + System.out.println("Message: " + text); + return true; + } +} diff --git a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGateway.java b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGateway.java deleted file mode 100644 index 70f1191596..0000000000 --- a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGateway.java +++ /dev/null @@ -1,30 +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.smsgateway; - -import javax.ejb.Remote; - -/** - * A gateway to send SMS messages. - */ -@Remote -public interface SMSGateway { - boolean sendSMS(String fromNumber, String toNumber, String text); -} diff --git a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayEJBServiceBootstrap.java b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayEJBServiceBootstrap.java deleted file mode 100644 index 5c1a61f4dc..0000000000 --- a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayEJBServiceBootstrap.java +++ /dev/null @@ -1,45 +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.smsgateway; - -import java.util.Properties; - -import javax.naming.Context; -import javax.naming.InitialContext; - -public class SMSGatewayEJBServiceBootstrap { - - public static void main(String[] args) throws Exception { - System.out.println("Publishing SMS Gateway Service as an EJB service"); - - Properties properties = new Properties(); - properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory"); - properties.setProperty("openejb.embedded.remotable", "true"); - - InitialContext initialContext = new InitialContext(properties); - - // Object object = initialContext.lookup("SMSGatewayImplRemote"); - // SMSGateway smsGateway = (SMSGateway) object; - // smsGateway.sendSMS("From", "to", "Message"); - - System.out.println("EJB server running - waiting for requests"); - System.out.println("Press enter to shutdown."); - System.in.read(); - } -} diff --git a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayImpl.java b/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayImpl.java deleted file mode 100644 index 5ce94bf3a2..0000000000 --- a/sandbox/travelsample/services/smsgateway-ejb/src/main/java/scatours/smsgateway/SMSGatewayImpl.java +++ /dev/null @@ -1,33 +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.smsgateway; - -import javax.ejb.Stateless; - -@Stateless -public class SMSGatewayImpl implements SMSGateway { - - public boolean sendSMS(String fromNumber, String toNumber, String text) { - System.out.println("Sending SMS message"); - System.out.println("From: " + fromNumber); - System.out.println("To: " + toNumber); - System.out.println("Message: " + text); - return true; - } -} diff --git a/sandbox/travelsample/services/smsgateway-jaxws/build.xml b/sandbox/travelsample/services/smsgateway-jaxws/build.xml index 1cb7f3c930..be9830cc1b 100644 --- a/sandbox/travelsample/services/smsgateway-jaxws/build.xml +++ b/sandbox/travelsample/services/smsgateway-jaxws/build.xml @@ -18,31 +18,14 @@ --> - - - - - - - - - - - + + - - - - + - - - - - - - diff --git a/sandbox/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java b/sandbox/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java index e63f248c1e..6631aee907 100644 --- a/sandbox/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java +++ b/sandbox/travelsample/services/smsgateway-jaxws/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayServiceBootstrap.java @@ -23,7 +23,7 @@ import javax.xml.ws.Endpoint; public class SMSGatewayServiceBootstrap { public static void main(String[] args) { - System.out.println("Publishing SMS Gateway Service as web service: http://localhost:8081/CreditCardService"); + System.out.println("Publishing SMS Gateway Service as web service: http://localhost:8081/SMSGatewayService"); System.out.println("Press Ctrl^C to terminate..."); Endpoint.publish("http://localhost:8081/SMSGatewayService", new SMSGatewayServiceImpl()); diff --git a/sandbox/travelsample/services/smsgateway-jms/build.xml b/sandbox/travelsample/services/smsgateway-jms/build.xml index 1bd42894db..fe7e66111e 100644 --- a/sandbox/travelsample/services/smsgateway-jms/build.xml +++ b/sandbox/travelsample/services/smsgateway-jms/build.xml @@ -18,31 +18,30 @@ --> - + - - - - + + + - + + + - + + - - + + + - - - - - - - diff --git a/sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/JMSBrokerLauncher.java b/sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/JMSBrokerLauncher.java new file mode 100644 index 0000000000..929eb78431 --- /dev/null +++ b/sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/JMSBrokerLauncher.java @@ -0,0 +1,38 @@ +/* + * 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 org.apache.activemq.broker.BrokerService; + +public class JMSBrokerLauncher { + + public static void main(String[] args) throws Exception { + final BrokerService jmsBroker = new BrokerService(); + jmsBroker.setPersistent(false); + jmsBroker.setUseJmx(false); + jmsBroker.addConnector("tcp://localhost:61619"); + jmsBroker.start(); + + System.out.println("JMS Message Broker started"); + System.out.println("Press enter to shutdown."); + System.in.read(); + + jmsBroker.stop(); + } +} diff --git a/sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java b/sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java index d27635f0c3..b4effa6f82 100644 --- a/sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java +++ b/sandbox/travelsample/services/smsgateway-jms/src/main/java/scatours/smsgateway/SMSGatewayJMSServiceBootstrap.java @@ -27,6 +27,7 @@ public class SMSGatewayJMSServiceBootstrap { public static void main(String[] args) throws Exception { System.out.println("Publishing SMS Gateway Service as a JMS service: tcp://localhost:61619"); + System.out.println("Press Ctrl^C to terminate..."); ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61619"); Connection connection = connectionFactory.createConnection(); diff --git a/sandbox/travelsample/services/smsgateway-rmi/build.xml b/sandbox/travelsample/services/smsgateway-rmi/build.xml index 5a2e7d1aac..2b43ed15db 100644 --- a/sandbox/travelsample/services/smsgateway-rmi/build.xml +++ b/sandbox/travelsample/services/smsgateway-rmi/build.xml @@ -18,31 +18,13 @@ --> - - - - - - - - - - - + + - - - - - + + - - - - - - - diff --git a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java new file mode 100644 index 0000000000..4ce528fd23 --- /dev/null +++ b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGateway.java @@ -0,0 +1,30 @@ +/* + * 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 com.tuscanyscatours.smsgateway; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +/** + * A gateway to send SMS messages. + */ +public interface SMSGateway extends Remote { + boolean sendSMS(String fromNumber, String toNumber, String text) throws RemoteException; +} diff --git a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java new file mode 100644 index 0000000000..c33439af8b --- /dev/null +++ b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayImpl.java @@ -0,0 +1,39 @@ +/* + * 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 com.tuscanyscatours.smsgateway; + +import java.rmi.RemoteException; +import java.rmi.server.UnicastRemoteObject; + +public class SMSGatewayImpl extends UnicastRemoteObject implements SMSGateway { + + private static final long serialVersionUID = -2739486025442222295L; + + protected SMSGatewayImpl() throws RemoteException { + super(); + } + + public boolean sendSMS(String fromNumber, String toNumber, String text) { + System.out.println("Sending SMS message"); + System.out.println("From: " + fromNumber); + System.out.println("To: " + toNumber); + System.out.println("Message: " + text); + return true; + } +} diff --git a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java new file mode 100644 index 0000000000..5b223fb40c --- /dev/null +++ b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/com/tuscanyscatours/smsgateway/SMSGatewayRMIServiceBootstrap.java @@ -0,0 +1,40 @@ +/* + * 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 com.tuscanyscatours.smsgateway; + +import java.rmi.registry.LocateRegistry; +import java.rmi.registry.Registry; + +public class SMSGatewayRMIServiceBootstrap { + + public static void main(String[] args) throws Exception { + System.out.println("Publishing SMS Gateway Service as a RMI service"); + + String serviceName = "SMSGatewayRMI"; + SMSGatewayImpl smsGatewayImpl = new SMSGatewayImpl(); + Registry rmiRegistry = LocateRegistry.createRegistry(8099); + rmiRegistry.bind(serviceName, smsGatewayImpl); + + System.out.println("RMI server running - waiting for requests"); + System.out.println("Press enter to shutdown."); + System.in.read(); + rmiRegistry.unbind(serviceName); + System.exit(-1); + } +} diff --git a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGateway.java b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGateway.java deleted file mode 100644 index e6e866fa1d..0000000000 --- a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGateway.java +++ /dev/null @@ -1,30 +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.smsgateway; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * A gateway to send SMS messages. - */ -public interface SMSGateway extends Remote { - boolean sendSMS(String fromNumber, String toNumber, String text) throws RemoteException; -} diff --git a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayImpl.java b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayImpl.java deleted file mode 100644 index 0ac8cd4293..0000000000 --- a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayImpl.java +++ /dev/null @@ -1,39 +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.smsgateway; - -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; - -public class SMSGatewayImpl extends UnicastRemoteObject implements SMSGateway { - - private static final long serialVersionUID = -2739486025442222295L; - - protected SMSGatewayImpl() throws RemoteException { - super(); - } - - public boolean sendSMS(String fromNumber, String toNumber, String text) { - System.out.println("Sending SMS message"); - System.out.println("From: " + fromNumber); - System.out.println("To: " + toNumber); - System.out.println("Message: " + text); - return true; - } -} diff --git a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayRMIServiceBootstrap.java b/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayRMIServiceBootstrap.java deleted file mode 100644 index b13f3d2aee..0000000000 --- a/sandbox/travelsample/services/smsgateway-rmi/src/main/java/scatours/smsgateway/SMSGatewayRMIServiceBootstrap.java +++ /dev/null @@ -1,40 +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.smsgateway; - -import java.rmi.registry.LocateRegistry; -import java.rmi.registry.Registry; - -public class SMSGatewayRMIServiceBootstrap { - - public static void main(String[] args) throws Exception { - System.out.println("Publishing SMS Gateway Service as a RMI service"); - - String serviceName = "SMSGatewayRMI"; - SMSGatewayImpl smsGatewayImpl = new SMSGatewayImpl(); - Registry rmiRegistry = LocateRegistry.createRegistry(8099); - rmiRegistry.bind(serviceName, smsGatewayImpl); - - System.out.println("RMI server running - waiting for requests"); - System.out.println("Press enter to shutdown."); - System.in.read(); - rmiRegistry.unbind(serviceName); - System.exit(-1); - } -} diff --git a/sandbox/travelsample/testdomain/build.xml b/sandbox/travelsample/testdomain/build.xml index 40c6689f71..1f8d60a8e3 100644 --- a/sandbox/travelsample/testdomain/build.xml +++ b/sandbox/travelsample/testdomain/build.xml @@ -23,7 +23,9 @@ - + + + -- cgit v1.2.3