From 60744a36aae604ac3c4499ed54f1082ab8f5947d Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 19 Nov 2008 00:10:54 +0000 Subject: Copying modules from Equinox branch, to start merging the delta changes from 1.x/original trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@718815 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/jms/HelloWorldClientImpl.java | 43 ++++++++++++++++++++++ .../tuscany/sca/binding/jms/HelloWorldService.java | 31 ++++++++++++++++ .../sca/binding/jms/HelloWorldServiceImpl.java | 32 ++++++++++++++++ .../src/test/resources/simple/client.composite | 38 +++++++++++++++++++ .../src/test/resources/simple/service.composite | 35 ++++++++++++++++++ 5 files changed, 179 insertions(+) create mode 100644 java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java create mode 100644 java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java create mode 100644 java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java create mode 100644 java/sca/modules/binding-jms-runtime/src/test/resources/simple/client.composite create mode 100644 java/sca/modules/binding-jms-runtime/src/test/resources/simple/service.composite (limited to 'java/sca/modules/binding-jms-runtime/src/test') diff --git a/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java new file mode 100644 index 0000000000..fb80362457 --- /dev/null +++ b/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java @@ -0,0 +1,43 @@ +/* + * 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 org.apache.tuscany.sca.binding.jms; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * This class implements the HelloWorld service. + * + * @version $Rev$ $Date$ + */ +@Service(HelloWorldService.class) +public class HelloWorldClientImpl implements HelloWorldService { + + private HelloWorldService serviceA; + + @Reference + public void setServiceA(HelloWorldService service) { + this.serviceA = service; + } + + public String sayHello(String name) { + return serviceA.sayHello(name); + } + +} diff --git a/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java new file mode 100644 index 0000000000..515da3144a --- /dev/null +++ b/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.tuscany.sca.binding.jms; + +import org.osoa.sca.annotations.Remotable; + +/** + * Interface for the HelloWorld Service. + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface HelloWorldService { + String sayHello(String name); +} diff --git a/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java new file mode 100644 index 0000000000..a8808c1bd1 --- /dev/null +++ b/java/sca/modules/binding-jms-runtime/src/test/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.tuscany.sca.binding.jms; + +/** + * Implementation of the HelloWorldService. + * + * @version $Rev$ $Date$ + */ +public class HelloWorldServiceImpl implements HelloWorldService { + + public String sayHello(String name) { + return "jmsHello " + name; + } + +} diff --git a/java/sca/modules/binding-jms-runtime/src/test/resources/simple/client.composite b/java/sca/modules/binding-jms-runtime/src/test/resources/simple/client.composite new file mode 100644 index 0000000000..dcea428493 --- /dev/null +++ b/java/sca/modules/binding-jms-runtime/src/test/resources/simple/client.composite @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/java/sca/modules/binding-jms-runtime/src/test/resources/simple/service.composite b/java/sca/modules/binding-jms-runtime/src/test/resources/simple/service.composite new file mode 100644 index 0000000000..44b7b29610 --- /dev/null +++ b/java/sca/modules/binding-jms-runtime/src/test/resources/simple/service.composite @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + -- cgit v1.2.3