From 3ab88505030fccad43563207ae97226f652ce206 Mon Sep 17 00:00:00 2001 From: nash Date: Sun, 26 Jul 2009 20:36:02 +0000 Subject: Fix TUSCANY-3171 (domain manager does not load definitions.xml files) git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@797987 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/scatours/emailgateway/EmailGateway.java | 30 +++++++++++++++++++ .../scatours/emailgateway/EmailGatewayImpl.java | 35 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGateway.java create mode 100644 branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGatewayImpl.java (limited to 'branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway') diff --git a/branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGateway.java b/branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGateway.java new file mode 100644 index 0000000000..d360381327 --- /dev/null +++ b/branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGateway.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 scatours.emailgateway; + +import org.osoa.sca.annotations.Remotable; + +/** + * A gateway to send e-mail + */ +@Remotable +public interface EmailGateway { + public boolean sendEmail(String sender, String recipient, String subject, String body); +} diff --git a/branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGatewayImpl.java b/branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGatewayImpl.java new file mode 100644 index 0000000000..060c3dabda --- /dev/null +++ b/branches/sca-java-1.5.1/itest/domainmgr/transaction/payment/src/main/java/scatours/emailgateway/EmailGatewayImpl.java @@ -0,0 +1,35 @@ +/* + * 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.emailgateway; + +import org.osoa.sca.annotations.Service; + +@Service(EmailGateway.class) +public class EmailGatewayImpl implements EmailGateway { + + public boolean sendEmail(String sender, String recipient, String subject, String body) { + System.out.println("From: " + sender); + System.out.println("To: " + recipient); + System.out.println("Subject: " + subject); + System.out.println(body); + return true; + } + +} -- cgit v1.2.3