From 1e5f3a40078f965934b13981e8cec16ceb27526f Mon Sep 17 00:00:00 2001 From: slaws Date: Tue, 23 Feb 2010 15:13:32 +0000 Subject: TUSCANY-3473 - add new contribution to test for the case where a local call (local interface) is used within a contribution but where the hazelcast registry is in operation git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@915372 13f79535-47bb-0310-9956-ffa450edef68 --- .../nodes/helloworld-service-and-client/pom.xml | 44 ++++++++++++++++++++++ .../src/main/java/itest/nodes/sac/Helloworld.java | 26 +++++++++++++ .../java/itest/nodes/sac/HelloworldClientImpl.java | 34 +++++++++++++++++ .../itest/nodes/sac/HelloworldServiceImpl.java | 30 +++++++++++++++ .../main/resources/META-INF/sca-contribution.xml | 23 +++++++++++ .../main/resources/helloworld-service.composite | 33 ++++++++++++++++ 6 files changed, 190 insertions(+) create mode 100644 sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/pom.xml create mode 100644 sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java create mode 100644 sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java create mode 100644 sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java create mode 100644 sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite (limited to 'sca-java-2.x/trunk') diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/pom.xml b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/pom.xml new file mode 100644 index 0000000000..cd2069cef3 --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/pom.xml @@ -0,0 +1,44 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 2.0-SNAPSHOT + ../pom.xml + + itest-nodes-helloworld-service-and-client + Apache Tuscany SCA iTest Nodes Helloworld Service and Client + + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0-SNAPSHOT + provided + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0-SNAPSHOT + + + diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java new file mode 100644 index 0000000000..1cb9b813f2 --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.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 itest.nodes.sac; + +public interface Helloworld { + + String sayHello(String name) throws Exception; + +} diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java new file mode 100644 index 0000000000..d64536a998 --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java @@ -0,0 +1,34 @@ +/* + * 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 itest.nodes.sac; + +import org.oasisopen.sca.annotation.Reference; + +public class HelloworldClientImpl implements Helloworld { + + @Reference + public Helloworld service; + + + public String sayHello(String name) throws Exception { + return "Hi " + service.sayHello(name); + } + +} diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java new file mode 100644 index 0000000000..728804b08c --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.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 itest.nodes.sac; + +public class HelloworldServiceImpl implements Helloworld { + + public String sayHello(String name) { + String response = "Hello " + name; + System.out.println("At service - " + response); + return response; + } + +} diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..555824a94e --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite new file mode 100644 index 0000000000..38ac479275 --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + -- cgit v1.2.3