From b9b95656d44226f58393cbb4f5a120a6f9bb316c Mon Sep 17 00:00:00 2001 From: nash Date: Tue, 15 Sep 2009 22:40:38 +0000 Subject: Apply new naming convention to notification-* launchers git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@815533 13f79535-47bb-0310-9956-ffa450edef68 --- .../launchers/notification-corba-launcher/pom.xml | 76 ------------- .../java/scatours/LaunchNotificationCORBANode.java | 55 ---------- .../java/scatours/notification/Notification.java | 26 ----- .../launchers/notification-corba/build.xml | 56 ++++++++++ .../launchers/notification-corba/pom.xml | 77 +++++++++++++ .../java/scatours/NotificationCORBALauncher.java | 55 ++++++++++ .../java/scatours/notification/Notification.java | 26 +++++ .../launchers/notification-ejb-launcher/pom.xml | 83 -------------- .../java/scatours/LaunchNotificationEJBNode.java | 60 ---------- .../java/scatours/notification/Notification.java | 26 ----- .../main/java/scatours/smsgateway/SMSGateway.java | 30 ----- .../launchers/notification-ejb/build.xml | 48 ++++++++ .../launchers/notification-ejb/pom.xml | 83 ++++++++++++++ .../java/scatours/NotificationEJBLauncher.java | 60 ++++++++++ .../java/scatours/notification/Notification.java | 26 +++++ .../launchers/notification-jms-launcher/pom.xml | 121 --------------------- .../src/main/java/scatours/LaunchJMSBroker.java | 38 ------- .../java/scatours/LaunchNotificationJMSNode.java | 57 ---------- .../java/scatours/notification/Notification.java | 26 ----- .../launchers/notification-jms/build.xml | 57 ++++++++++ .../launchers/notification-jms/pom.xml | 121 +++++++++++++++++++++ .../src/main/java/scatours/JMSBrokerLauncher.java | 38 +++++++ .../java/scatours/NotificationJMSLauncher.java | 57 ++++++++++ .../java/scatours/notification/Notification.java | 26 +++++ .../launchers/notification-rmi-launcher/pom.xml | 77 ------------- .../java/scatours/LaunchNotificationRMINode.java | 55 ---------- .../java/scatours/notification/Notification.java | 26 ----- .../main/java/scatours/smsgateway/SMSGateway.java | 30 ----- .../launchers/notification-rmi/build.xml | 48 ++++++++ .../launchers/notification-rmi/pom.xml | 77 +++++++++++++ .../java/scatours/NotificationRMILauncher.java | 55 ++++++++++ .../java/scatours/notification/Notification.java | 26 +++++ .../launchers/notification-ws-launcher/pom.xml | 77 ------------- .../java/scatours/LaunchNotificationWSNode.java | 55 ---------- .../java/scatours/notification/Notification.java | 26 ----- .../main/java/scatours/smsgateway/SMSGateway.java | 30 ----- .../launchers/notification-ws/build.xml | 48 ++++++++ .../travelsample/launchers/notification-ws/pom.xml | 77 +++++++++++++ .../main/java/scatours/NotificationWSLauncher.java | 55 ++++++++++ .../java/scatours/notification/Notification.java | 26 +++++ sandbox/travelsample/launchers/pom.xml | 10 +- 41 files changed, 1147 insertions(+), 979 deletions(-) delete mode 100644 sandbox/travelsample/launchers/notification-corba-launcher/pom.xml delete mode 100644 sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/LaunchNotificationCORBANode.java delete mode 100644 sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/notification/Notification.java create mode 100644 sandbox/travelsample/launchers/notification-corba/build.xml create mode 100644 sandbox/travelsample/launchers/notification-corba/pom.xml create mode 100644 sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java create mode 100644 sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java delete mode 100644 sandbox/travelsample/launchers/notification-ejb-launcher/pom.xml delete mode 100644 sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/LaunchNotificationEJBNode.java delete mode 100644 sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/notification/Notification.java delete mode 100644 sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/smsgateway/SMSGateway.java create mode 100644 sandbox/travelsample/launchers/notification-ejb/build.xml create mode 100644 sandbox/travelsample/launchers/notification-ejb/pom.xml create mode 100644 sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java create mode 100644 sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java delete mode 100644 sandbox/travelsample/launchers/notification-jms-launcher/pom.xml delete mode 100644 sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/LaunchJMSBroker.java delete mode 100644 sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/LaunchNotificationJMSNode.java delete mode 100644 sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/notification/Notification.java create mode 100644 sandbox/travelsample/launchers/notification-jms/build.xml create mode 100644 sandbox/travelsample/launchers/notification-jms/pom.xml create mode 100644 sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/JMSBrokerLauncher.java create mode 100644 sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java create mode 100644 sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java delete mode 100644 sandbox/travelsample/launchers/notification-rmi-launcher/pom.xml delete mode 100644 sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/LaunchNotificationRMINode.java delete mode 100644 sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/notification/Notification.java delete mode 100644 sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/smsgateway/SMSGateway.java create mode 100644 sandbox/travelsample/launchers/notification-rmi/build.xml create mode 100644 sandbox/travelsample/launchers/notification-rmi/pom.xml create mode 100644 sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java create mode 100644 sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java delete mode 100644 sandbox/travelsample/launchers/notification-ws-launcher/pom.xml delete mode 100644 sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/LaunchNotificationWSNode.java delete mode 100644 sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/notification/Notification.java delete mode 100644 sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/smsgateway/SMSGateway.java create mode 100644 sandbox/travelsample/launchers/notification-ws/build.xml create mode 100644 sandbox/travelsample/launchers/notification-ws/pom.xml create mode 100644 sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java create mode 100644 sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java (limited to 'sandbox/travelsample') diff --git a/sandbox/travelsample/launchers/notification-corba-launcher/pom.xml b/sandbox/travelsample/launchers/notification-corba-launcher/pom.xml deleted file mode 100644 index 68cceed970..0000000000 --- a/sandbox/travelsample/launchers/notification-corba-launcher/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.6-SNAPSHOT - - 1.0-SNAPSHOT - scatours-notification-corba-launcher - Apache Tuscany SCA Tours Notification CORBA Service Launcher - - - - org.apache.tuscany.sca - tuscany-node-api - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.6-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-corba-runtime - 1.6-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-host-corba-jse-tns - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - diff --git a/sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/LaunchNotificationCORBANode.java b/sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/LaunchNotificationCORBANode.java deleted file mode 100644 index eec08b92c0..0000000000 --- a/sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/LaunchNotificationCORBANode.java +++ /dev/null @@ -1,55 +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.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import scatours.notification.Notification; - -public class LaunchNotificationCORBANode { - - public static void main(String[] args) throws Exception { - SCAContribution notificationContribution = - new SCAContribution("notification", - "../../contributions/notification-contribution/target/classes"); - SCAContribution notificationCORBAContribution = - new SCAContribution("notification-corba", - "../../contributions/notification-corba-contribution/target/classes"); - - SCANode node = SCANodeFactory.newInstance().createSCANode( - "notification-corba.composite", notificationContribution, notificationCORBAContribution); - node.start(); - - System.out.println("Quick notification test"); - Notification notification = ((SCAClient)node).getService( - Notification.class, "Notification"); - String accountID = "1234"; - String subject = "Holiday payment taken"; - String message = "Payment of £102.37 accepted..."; - notification.notify(accountID, subject, message); - - System.out.println("Node started - Press enter to shutdown."); - System.in.read(); - node.stop(); - } -} diff --git a/sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/notification/Notification.java deleted file mode 100644 index 79706fcc9d..0000000000 --- a/sandbox/travelsample/launchers/notification-corba-launcher/src/main/java/scatours/notification/Notification.java +++ /dev/null @@ -1,26 +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.notification; - -public interface Notification { - - boolean notify(String accountID, String subject, String message); - -} diff --git a/sandbox/travelsample/launchers/notification-corba/build.xml b/sandbox/travelsample/launchers/notification-corba/build.xml new file mode 100644 index 0000000000..b931f708d1 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-corba/build.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/launchers/notification-corba/pom.xml b/sandbox/travelsample/launchers/notification-corba/pom.xml new file mode 100644 index 0000000000..abe8fdf4de --- /dev/null +++ b/sandbox/travelsample/launchers/notification-corba/pom.xml @@ -0,0 +1,77 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-launcher-notification-corba + Apache Tuscany SCA Tours Notification CORBA Service Launcher + + + + org.apache.tuscany.sca + tuscany-node-api + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-node-runtime + 1.6-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-binding-corba-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-corba-jse-tns + 1.6-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + diff --git a/sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java b/sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java new file mode 100644 index 0000000000..6b3147dce9 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/NotificationCORBALauncher.java @@ -0,0 +1,55 @@ +/* + * 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.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationCORBALauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = + new SCAContribution("notification", + "../../contributions/notification/target/classes"); + SCAContribution notificationCORBAContribution = + new SCAContribution("notification-corba", + "../../contributions/notification-corba/target/classes"); + + SCANode node = SCANodeFactory.newInstance().createSCANode( + "notification-corba.composite", notificationContribution, notificationCORBAContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService( + Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..79706fcc9d --- /dev/null +++ b/sandbox/travelsample/launchers/notification-corba/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * 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.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sandbox/travelsample/launchers/notification-ejb-launcher/pom.xml b/sandbox/travelsample/launchers/notification-ejb-launcher/pom.xml deleted file mode 100644 index 3c3a622e4a..0000000000 --- a/sandbox/travelsample/launchers/notification-ejb-launcher/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.6-SNAPSHOT - - 1.0-SNAPSHOT - scatours-notification-ejb-launcher - Apache Tuscany SCA Tours Notification EJB Launcher - - - - org.apache.tuscany.sca - tuscany-node-api - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.6-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-ejb - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ejb-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.openejb - openejb-ejbd - 3.1.1 - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - diff --git a/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/LaunchNotificationEJBNode.java b/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/LaunchNotificationEJBNode.java deleted file mode 100644 index 3e367f8835..0000000000 --- a/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/LaunchNotificationEJBNode.java +++ /dev/null @@ -1,60 +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 javax.naming.Context; - -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import scatours.notification.Notification; - -public class LaunchNotificationEJBNode { - - public static void main(String[] args) throws Exception { - System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory"); - System.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201"); - - SCAContribution notificationContribution = - new SCAContribution("notification", - "../../contributions/notification-contribution/target/classes"); - SCAContribution notificationEJBContribution = - new SCAContribution("notification-ejb", - "../../contributions/notification-ejb-contribution/target/classes"); - - SCANode node = SCANodeFactory.newInstance().createSCANode( - "notification-ejb.composite", notificationContribution, notificationEJBContribution); - node.start(); - - System.out.println("Quick notification test"); - Notification notification = ((SCAClient)node).getService( - Notification.class, "Notification"); - String accountID = "1234"; - String subject = "Holiday payment taken"; - String message = "Payment of £102.37 accepted..."; - notification.notify(accountID, subject, message); - - System.out.println("Node started - Press enter to shutdown."); - System.in.read(); - node.stop(); - } -} diff --git a/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/notification/Notification.java deleted file mode 100644 index 79706fcc9d..0000000000 --- a/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/notification/Notification.java +++ /dev/null @@ -1,26 +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.notification; - -public interface Notification { - - boolean notify(String accountID, String subject, String message); - -} diff --git a/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/smsgateway/SMSGateway.java b/sandbox/travelsample/launchers/notification-ejb-launcher/src/main/java/scatours/smsgateway/SMSGateway.java deleted file mode 100644 index b96d0b2473..0000000000 --- a/sandbox/travelsample/launchers/notification-ejb-launcher/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 org.osoa.sca.annotations.Remotable; - -/** - * A gateway to send SMS messages. - */ -@Remotable -public interface SMSGateway { - boolean sendSMS(String fromNumber, String toNumber, String text); -} diff --git a/sandbox/travelsample/launchers/notification-ejb/build.xml b/sandbox/travelsample/launchers/notification-ejb/build.xml new file mode 100644 index 0000000000..27d9ab92cd --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ejb/build.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/launchers/notification-ejb/pom.xml b/sandbox/travelsample/launchers/notification-ejb/pom.xml new file mode 100644 index 0000000000..5326eb8deb --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ejb/pom.xml @@ -0,0 +1,83 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-launcher-notification-ejb + Apache Tuscany SCA Tours Notification EJB Launcher + + + + org.apache.tuscany.sca + tuscany-node-api + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-node-runtime + 1.6-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-binding-ejb + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ejb-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.openejb + openejb-ejbd + 3.1.1 + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + diff --git a/sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java b/sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java new file mode 100644 index 0000000000..6b01299ca8 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/NotificationEJBLauncher.java @@ -0,0 +1,60 @@ +/* + * 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 javax.naming.Context; + +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationEJBLauncher { + + public static void main(String[] args) throws Exception { + System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory"); + System.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201"); + + SCAContribution notificationContribution = + new SCAContribution("notification", + "../../contributions/notification/target/classes"); + SCAContribution notificationEJBContribution = + new SCAContribution("notification-ejb", + "../../contributions/notification-ejb/target/classes"); + + SCANode node = SCANodeFactory.newInstance().createSCANode( + "notification-ejb.composite", notificationContribution, notificationEJBContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService( + Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..79706fcc9d --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ejb/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * 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.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sandbox/travelsample/launchers/notification-jms-launcher/pom.xml b/sandbox/travelsample/launchers/notification-jms-launcher/pom.xml deleted file mode 100644 index 66930213f6..0000000000 --- a/sandbox/travelsample/launchers/notification-jms-launcher/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.6-SNAPSHOT - - 1.0-SNAPSHOT - scatours-notification-jms-launcher - Apache Tuscany SCA Tours Notification JMS Launcher - - - - org.apache.tuscany.sca - tuscany-node-api - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.6-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-host-jms-asf - 1.6-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - org.apache.activemq - activemq-all - 5.2.0 - - - org.apache.activemq - activemq-web-demo - - - - - - org.apache.ws.commons.axiom - axiom-api - 1.2.7 - - - xerces - xercesImpl - - - stax - stax-api - - - xml-apis - xml-apis - - - - - - org.apache.ws.commons.axiom - axiom-impl - 1.2.7 - runtime - - - stax - stax-api - - - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - diff --git a/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/LaunchJMSBroker.java b/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/LaunchJMSBroker.java deleted file mode 100644 index fee4c357a1..0000000000 --- a/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/LaunchJMSBroker.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 LaunchJMSBroker { - - 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-jms-launcher/src/main/java/scatours/LaunchNotificationJMSNode.java b/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/LaunchNotificationJMSNode.java deleted file mode 100644 index 2715a56fba..0000000000 --- a/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/LaunchNotificationJMSNode.java +++ /dev/null @@ -1,57 +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.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import scatours.notification.Notification; - -public class LaunchNotificationJMSNode { - - public static void main(String[] args) throws Exception { - SCAContribution notificationContribution = - new SCAContribution("notification", - "../../contributions/notification-contribution/target/classes"); - SCAContribution notificationJMSContribution = - new SCAContribution("notification-jms", - "../../contributions/notification-jms-contribution/target/classes"); - - SCANode node = SCANodeFactory.newInstance().createSCANode( - "notification-jms.composite", notificationContribution, notificationJMSContribution); - - try { - node.start(); - - System.out.println("Quick notification test"); - Notification notification = ((SCAClient)node).getService( - Notification.class, "Notification"); - String accountID = "1234"; - String subject = "Holiday payment taken"; - String message = "Payment of £102.37 accepted..."; - notification.notify(accountID, subject, message); - System.out.println("Notification sent"); - } finally { - node.stop(); - } - } -} diff --git a/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/notification/Notification.java deleted file mode 100644 index 79706fcc9d..0000000000 --- a/sandbox/travelsample/launchers/notification-jms-launcher/src/main/java/scatours/notification/Notification.java +++ /dev/null @@ -1,26 +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.notification; - -public interface Notification { - - boolean notify(String accountID, String subject, String message); - -} diff --git a/sandbox/travelsample/launchers/notification-jms/build.xml b/sandbox/travelsample/launchers/notification-jms/build.xml new file mode 100644 index 0000000000..1a0130aa82 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-jms/build.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/launchers/notification-jms/pom.xml b/sandbox/travelsample/launchers/notification-jms/pom.xml new file mode 100644 index 0000000000..7574ed8cf3 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-jms/pom.xml @@ -0,0 +1,121 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-launcher-notification-jms + Apache Tuscany SCA Tours Notification JMS Launcher + + + + org.apache.tuscany.sca + tuscany-node-api + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-node-runtime + 1.6-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-host-jms-asf + 1.6-SNAPSHOT + + + + junit + junit + 4.5 + test + + + + org.apache.activemq + activemq-all + 5.2.0 + + + org.apache.activemq + activemq-web-demo + + + + + + org.apache.ws.commons.axiom + axiom-api + 1.2.7 + + + xerces + xercesImpl + + + stax + stax-api + + + xml-apis + xml-apis + + + + + + org.apache.ws.commons.axiom + axiom-impl + 1.2.7 + runtime + + + stax + stax-api + + + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + 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 new file mode 100644 index 0000000000..7d063ca865 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-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/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java b/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java new file mode 100644 index 0000000000..c0d6b5742e --- /dev/null +++ b/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/NotificationJMSLauncher.java @@ -0,0 +1,57 @@ +/* + * 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.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationJMSLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = + new SCAContribution("notification", + "../../contributions/notification/target/classes"); + SCAContribution notificationJMSContribution = + new SCAContribution("notification-jms", + "../../contributions/notification-jms/target/classes"); + + SCANode node = SCANodeFactory.newInstance().createSCANode( + "notification-jms.composite", notificationContribution, notificationJMSContribution); + + try { + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService( + Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + System.out.println("Notification sent"); + } finally { + node.stop(); + } + } +} diff --git a/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..79706fcc9d --- /dev/null +++ b/sandbox/travelsample/launchers/notification-jms/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * 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.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sandbox/travelsample/launchers/notification-rmi-launcher/pom.xml b/sandbox/travelsample/launchers/notification-rmi-launcher/pom.xml deleted file mode 100644 index a589727d6f..0000000000 --- a/sandbox/travelsample/launchers/notification-rmi-launcher/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.6-SNAPSHOT - - 1.0-SNAPSHOT - scatours-notification-rmi-launcher - Apache Tuscany SCA Tours Notification RMI Launcher - - - - org.apache.tuscany.sca - tuscany-node-api - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.6-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-rmi - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-rmi-runtime - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - diff --git a/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/LaunchNotificationRMINode.java b/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/LaunchNotificationRMINode.java deleted file mode 100644 index 96792b1343..0000000000 --- a/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/LaunchNotificationRMINode.java +++ /dev/null @@ -1,55 +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.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import scatours.notification.Notification; - -public class LaunchNotificationRMINode { - - public static void main(String[] args) throws Exception { - SCAContribution notificationContribution = - new SCAContribution("notification", - "../../contributions/notification-contribution/target/classes"); - SCAContribution notificationRMIContribution = - new SCAContribution("notification-rmi", - "../../contributions/notification-rmi-contribution/target/classes"); - - SCANode node = SCANodeFactory.newInstance().createSCANode( - "notification-rmi.composite", notificationContribution, notificationRMIContribution); - node.start(); - - System.out.println("Quick notification test"); - Notification notification = ((SCAClient)node).getService( - Notification.class, "Notification"); - String accountID = "1234"; - String subject = "Holiday payment taken"; - String message = "Payment of £102.37 accepted..."; - notification.notify(accountID, subject, message); - - System.out.println("Node started - Press enter to shutdown."); - System.in.read(); - node.stop(); - } -} diff --git a/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/notification/Notification.java deleted file mode 100644 index 79706fcc9d..0000000000 --- a/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/notification/Notification.java +++ /dev/null @@ -1,26 +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.notification; - -public interface Notification { - - boolean notify(String accountID, String subject, String message); - -} diff --git a/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/smsgateway/SMSGateway.java b/sandbox/travelsample/launchers/notification-rmi-launcher/src/main/java/scatours/smsgateway/SMSGateway.java deleted file mode 100644 index b96d0b2473..0000000000 --- a/sandbox/travelsample/launchers/notification-rmi-launcher/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 org.osoa.sca.annotations.Remotable; - -/** - * A gateway to send SMS messages. - */ -@Remotable -public interface SMSGateway { - boolean sendSMS(String fromNumber, String toNumber, String text); -} diff --git a/sandbox/travelsample/launchers/notification-rmi/build.xml b/sandbox/travelsample/launchers/notification-rmi/build.xml new file mode 100644 index 0000000000..70b5b18f77 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-rmi/build.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/launchers/notification-rmi/pom.xml b/sandbox/travelsample/launchers/notification-rmi/pom.xml new file mode 100644 index 0000000000..da85e9d9d3 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-rmi/pom.xml @@ -0,0 +1,77 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-launcher-notification-rmi + Apache Tuscany SCA Tours Notification RMI Launcher + + + + org.apache.tuscany.sca + tuscany-node-api + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-node-runtime + 1.6-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-binding-rmi + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-rmi-runtime + 1.6-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + diff --git a/sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java b/sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java new file mode 100644 index 0000000000..6fdb064c16 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/NotificationRMILauncher.java @@ -0,0 +1,55 @@ +/* + * 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.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationRMILauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = + new SCAContribution("notification", + "../../contributions/notification/target/classes"); + SCAContribution notificationRMIContribution = + new SCAContribution("notification-rmi", + "../../contributions/notification-rmi/target/classes"); + + SCANode node = SCANodeFactory.newInstance().createSCANode( + "notification-rmi.composite", notificationContribution, notificationRMIContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService( + Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..79706fcc9d --- /dev/null +++ b/sandbox/travelsample/launchers/notification-rmi/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * 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.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sandbox/travelsample/launchers/notification-ws-launcher/pom.xml b/sandbox/travelsample/launchers/notification-ws-launcher/pom.xml deleted file mode 100644 index 42b28b16c6..0000000000 --- a/sandbox/travelsample/launchers/notification-ws-launcher/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.6-SNAPSHOT - - 1.0-SNAPSHOT - scatours-notification-ws-launcher - Apache Tuscany SCA Tours Notification Web Service Launcher - - - - org.apache.tuscany.sca - tuscany-node-api - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 1.6-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - diff --git a/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/LaunchNotificationWSNode.java b/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/LaunchNotificationWSNode.java deleted file mode 100644 index fd0f2519e3..0000000000 --- a/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/LaunchNotificationWSNode.java +++ /dev/null @@ -1,55 +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.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; - -import scatours.notification.Notification; - -public class LaunchNotificationWSNode { - - public static void main(String[] args) throws Exception { - SCAContribution notificationContribution = - new SCAContribution("notification", - "../../contributions/notification-contribution/target/classes"); - SCAContribution notificationWSContribution = - new SCAContribution("notification-ws", - "../../contributions/notification-ws-contribution/target/classes"); - - SCANode node = SCANodeFactory.newInstance().createSCANode( - "notification-ws.composite", notificationContribution, notificationWSContribution); - node.start(); - - System.out.println("Quick notification test"); - Notification notification = ((SCAClient)node).getService( - Notification.class, "Notification"); - String accountID = "1234"; - String subject = "Holiday payment taken"; - String message = "Payment of £102.37 accepted..."; - notification.notify(accountID, subject, message); - - System.out.println("Node started - Press enter to shutdown."); - System.in.read(); - node.stop(); - } -} diff --git a/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/notification/Notification.java deleted file mode 100644 index 79706fcc9d..0000000000 --- a/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/notification/Notification.java +++ /dev/null @@ -1,26 +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.notification; - -public interface Notification { - - boolean notify(String accountID, String subject, String message); - -} diff --git a/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/smsgateway/SMSGateway.java b/sandbox/travelsample/launchers/notification-ws-launcher/src/main/java/scatours/smsgateway/SMSGateway.java deleted file mode 100644 index b96d0b2473..0000000000 --- a/sandbox/travelsample/launchers/notification-ws-launcher/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 org.osoa.sca.annotations.Remotable; - -/** - * A gateway to send SMS messages. - */ -@Remotable -public interface SMSGateway { - boolean sendSMS(String fromNumber, String toNumber, String text); -} diff --git a/sandbox/travelsample/launchers/notification-ws/build.xml b/sandbox/travelsample/launchers/notification-ws/build.xml new file mode 100644 index 0000000000..8be5783cb3 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ws/build.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/launchers/notification-ws/pom.xml b/sandbox/travelsample/launchers/notification-ws/pom.xml new file mode 100644 index 0000000000..40a6b13ed5 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ws/pom.xml @@ -0,0 +1,77 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-launcher-notification-ws + Apache Tuscany SCA Tours Notification Web Service Launcher + + + + org.apache.tuscany.sca + tuscany-node-api + 1.6-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-node-runtime + 1.6-SNAPSHOT + test + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + 1.6-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + ${artifactId} + + diff --git a/sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java b/sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java new file mode 100644 index 0000000000..08af2c3b58 --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java @@ -0,0 +1,55 @@ +/* + * 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.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCAContribution; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; + +import scatours.notification.Notification; + +public class NotificationWSLauncher { + + public static void main(String[] args) throws Exception { + SCAContribution notificationContribution = + new SCAContribution("notification", + "../../contributions/notification/target/classes"); + SCAContribution notificationWSContribution = + new SCAContribution("notification-ws", + "../../contributions/notification-ws/target/classes"); + + SCANode node = SCANodeFactory.newInstance().createSCANode( + "notification-ws.composite", notificationContribution, notificationWSContribution); + node.start(); + + System.out.println("Quick notification test"); + Notification notification = ((SCAClient)node).getService( + Notification.class, "Notification"); + String accountID = "1234"; + String subject = "Holiday payment taken"; + String message = "Payment of £102.37 accepted..."; + notification.notify(accountID, subject, message); + + System.out.println("Node started - Press enter to shutdown."); + System.in.read(); + node.stop(); + } +} diff --git a/sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java b/sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java new file mode 100644 index 0000000000..79706fcc9d --- /dev/null +++ b/sandbox/travelsample/launchers/notification-ws/src/main/java/scatours/notification/Notification.java @@ -0,0 +1,26 @@ +/* + * 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.notification; + +public interface Notification { + + boolean notify(String accountID, String subject, String message); + +} diff --git a/sandbox/travelsample/launchers/pom.xml b/sandbox/travelsample/launchers/pom.xml index 3ffe665142..edfccff641 100644 --- a/sandbox/travelsample/launchers/pom.xml +++ b/sandbox/travelsample/launchers/pom.xml @@ -54,11 +54,11 @@ fullapp-domain fullapp-nodes help-pages - notification-ws-launcher - notification-corba-launcher - notification-ejb-launcher - notification-jms-launcher - notification-rmi-launcher + notification-ws + notification-corba + notification-ejb + notification-jms + notification-rmi policy -- cgit v1.2.3