diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-23 15:13:32 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-23 15:13:32 +0000 |
commit | 1e5f3a40078f965934b13981e8cec16ceb27526f (patch) | |
tree | 2fd4dccaccc21a6261eee95a5f1ecb45ee5d9062 /sca-java-2.x/trunk | |
parent | ce1eb710c26b064a819f75a7331063b17b5d3984 (diff) |
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
Diffstat (limited to 'sca-java-2.x/trunk')
6 files changed, 190 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-itest</artifactId> + <version>2.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>itest-nodes-helloworld-service-and-client</artifactId> + <name>Apache Tuscany SCA iTest Nodes Helloworld Service and Client</name> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca-api</artifactId> + <version>2.0-SNAPSHOT</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca-api</artifactId> + <version>2.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + xmlns:itest="http://itest"> + <deployable composite="itest:HelloworldServiceAndClient"/> +</contribution>
\ 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" + targetNamespace="http://itest" + name="HelloworldServiceAndClient"> + + <component name="HelloworldClient"> + <implementation.java class="itest.nodes.sac.HelloworldClientImpl"/> + <reference name="service" target="HelloworldService"/> + </component> + + <component name="HelloworldService"> + <implementation.java class="itest.nodes.sac.HelloworldServiceImpl"/> + </component> + +</composite> |