From a3c48da9bb8971497d414f86e352123d95b9c3da Mon Sep 17 00:00:00 2001 From: lresende Date: Fri, 20 Nov 2009 23:53:35 +0000 Subject: Moving 2.x trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882795 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/rmi/RMISCABindingProviderFactory.java | 52 ++++++++ .../sca/rmi/RMISCAReferenceBindingProvider.java | 104 ++++++++++++++++ .../sca/rmi/RMISCAServiceBindingProvider.java | 131 +++++++++++++++++++++ ...che.tuscany.sca.provider.BindingProviderFactory | 20 ++++ .../sca/binding/sca/rmi/AsynchTestCase.java | 78 ++++++++++++ .../sca/binding/sca/rmi/CallbackTestCase.java | 82 +++++++++++++ .../sca/binding/sca/rmi/PromotionTestCase.java | 72 +++++++++++ .../sca/binding/sca/rmi/SimpleTestCase.java | 110 +++++++++++++++++ .../rmi/helloworld/HelloWorldCallbackRemote.java | 30 +++++ .../sca/rmi/helloworld/HelloWorldClient.java | 27 +++++ .../HelloWorldServiceCallbackOnewayRemote.java | 33 ++++++ .../HelloWorldServiceCallbackRemote.java | 31 +++++ .../sca/rmi/helloworld/HelloWorldServiceLocal.java | 27 +++++ .../rmi/helloworld/HelloWorldServiceRemote.java | 29 +++++ .../rmi/helloworld/HelloWorldServiceRemote2.java | 29 +++++ .../HelloWorldClientCallbackOnewayRemoteImpl.java | 43 +++++++ .../impl/HelloWorldClientCallbackRemoteImpl.java | 42 +++++++ .../helloworld/impl/HelloWorldClientLocalImpl.java | 35 ++++++ .../impl/HelloWorldClientRemote2Impl.java | 35 ++++++ .../impl/HelloWorldClientRemoteImpl.java | 35 ++++++ .../HelloWorldServiceCallbackOnewayRemoteImpl.java | 35 ++++++ .../impl/HelloWorldServiceCallbackRemoteImpl.java | 39 ++++++ .../impl/HelloWorldServiceLocalImpl.java | 30 +++++ .../HelloWorldServiceMultipleServicesImpl.java | 41 +++++++ .../impl/HelloWorldServiceRemoteImpl.java | 30 +++++ .../resources/asynchReference/HelloWorld.composite | 36 ++++++ .../asynchReference/META-INF/sca-contribution.xml | 23 ++++ .../resources/asynchService/HelloWorld.composite | 38 ++++++ .../asynchService/META-INF/sca-contribution.xml | 23 ++++ .../callbackReference/HelloWorld.composite | 36 ++++++ .../META-INF/sca-contribution.xml | 23 ++++ .../resources/callbackService/HelloWorld.composite | 43 +++++++ .../callbackService/META-INF/sca-contribution.xml | 23 ++++ .../promotionReference/HelloWorld.composite | 33 ++++++ .../HelloWorldComponent.composite | 37 ++++++ .../META-INF/sca-contribution.xml | 23 ++++ .../promotionService/HelloWorld.composite | 35 ++++++ .../promotionService/HelloWorldComponent.composite | 37 ++++++ .../promotionService/META-INF/sca-contribution.xml | 23 ++++ .../resources/simpleReference/HelloWorld.composite | 67 +++++++++++ .../simpleReference/META-INF/sca-contribution.xml | 23 ++++ .../resources/simpleService/HelloWorld.composite | 85 +++++++++++++ .../simpleService/META-INF/sca-contribution.xml | 23 ++++ 43 files changed, 1851 insertions(+) create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCABindingProviderFactory.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAReferenceBindingProvider.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAServiceBindingProvider.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorldComponent.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorldComponent.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/HelloWorld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/META-INF/sca-contribution.xml (limited to 'sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src') diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCABindingProviderFactory.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCABindingProviderFactory.java new file mode 100644 index 0000000000..e1f700fa51 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCABindingProviderFactory.java @@ -0,0 +1,52 @@ +/* + * 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.sca.rmi; + +import org.apache.tuscany.sca.assembly.DistributedSCABinding; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.provider.BindingProviderFactory; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; + +/** + * The factory for the RMI based implementation of the distributed sca binding + */ +public class RMISCABindingProviderFactory implements BindingProviderFactory { + + private ExtensionPointRegistry extensionPoints; + + public RMISCABindingProviderFactory(ExtensionPointRegistry extensionPoints) { + this.extensionPoints = extensionPoints; + } + + public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpointReference) { + return new RMISCAReferenceBindingProvider(endpointReference, extensionPoints); + } + + public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { + return new RMISCAServiceBindingProvider(endpoint, extensionPoints); + } + + public Class getModelType() { + return DistributedSCABinding.class; + } +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAReferenceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAReferenceBindingProvider.java new file mode 100644 index 0000000000..154aca8f53 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAReferenceBindingProvider.java @@ -0,0 +1,104 @@ +/* + * 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.sca.rmi; + +import java.util.logging.Logger; + +import org.apache.tuscany.sca.assembly.DistributedSCABinding; +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.assembly.SCABinding; +import org.apache.tuscany.sca.binding.rmi.RMIBinding; +import org.apache.tuscany.sca.binding.rmi.RMIBindingFactory; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.provider.BindingProviderFactory; +import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; + +/** + * The reference binding provider for the remote sca binding implementation. Relies on the + * binding-ws-axis implementation for sending messages to remote services so this provider + * uses the ws-axis provider under the covers. + */ +public class RMISCAReferenceBindingProvider implements ReferenceBindingProvider { + + private static final Logger logger = Logger.getLogger(RMISCAReferenceBindingProvider.class.getName()); + + private SCABinding binding; + private RMIBinding rmiBinding; + private ReferenceBindingProvider referenceBindingProvider; + + public RMISCAReferenceBindingProvider(EndpointReference endpointReference, + ExtensionPointRegistry extensionPoints) { + + FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); + + this.binding = ((DistributedSCABinding)endpointReference.getBinding()).getSCABinding(); + + rmiBinding = modelFactories.getFactory(RMIBindingFactory.class).createRMIBinding(); + rmiBinding.setName(this.binding.getName()); + rmiBinding.setURI(this.binding.getURI()); + + // create a copy of the endpoint reference but with the RMI binding in + RuntimeEndpointReference epr = null; + try { + epr = (RuntimeEndpointReference)endpointReference.clone(); + } catch (Exception ex){ + // we know we can clone endpoint references + } + epr.setBinding(rmiBinding); + + // create the real RMI reference binding provider + ProviderFactoryExtensionPoint providerFactories = extensionPoints.getExtensionPoint(ProviderFactoryExtensionPoint.class); + BindingProviderFactory providerFactory = (BindingProviderFactory)providerFactories.getProviderFactory(RMIBinding.class); + referenceBindingProvider = providerFactory.createReferenceBindingProvider(epr); + // Set the reference binding provider so that it can be used to start/stop + ((RuntimeEndpointReference) endpointReference).setBindingProvider(referenceBindingProvider); + logger.info("Reference using RMI SCA Binding: " + rmiBinding.getURI()); + } + + public InterfaceContract getBindingInterfaceContract() { + return null; + } + + public boolean supportsOneWayInvocation() { + return false; + } + + public Invoker createInvoker(Operation operation) { + return referenceBindingProvider.createInvoker(operation); + } + + public SCABinding getSCABinding () { + return binding; + } + + public void start() { + referenceBindingProvider.start(); + } + + public void stop() { + referenceBindingProvider.stop(); + } +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAServiceBindingProvider.java new file mode 100644 index 0000000000..f230926183 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/java/org/apache/tuscany/sca/binding/sca/rmi/RMISCAServiceBindingProvider.java @@ -0,0 +1,131 @@ +/* + * 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.sca.rmi; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.net.URI; +import java.net.UnknownHostException; +import java.util.logging.Logger; + +import org.apache.tuscany.sca.assembly.DistributedSCABinding; +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.SCABinding; +import org.apache.tuscany.sca.binding.rmi.RMIBinding; +import org.apache.tuscany.sca.binding.rmi.RMIBindingFactory; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.provider.BindingProviderFactory; +import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +/** + * The service binding provider for the remote sca binding implementation. Relies on the + * RMI binding for providing a remote message endpoint + */ +public class RMISCAServiceBindingProvider implements ServiceBindingProvider { + + private static final Logger logger = Logger.getLogger(RMISCAServiceBindingProvider.class.getName()); + + private SCABinding binding; + private RMIBinding rmiBinding; + private ServiceBindingProvider serviceBindingProvider; + + private boolean started = false; + + public RMISCAServiceBindingProvider(Endpoint endpoint, ExtensionPointRegistry extensionPoints) { + + FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); + + this.binding = ((DistributedSCABinding)endpoint.getBinding()).getSCABinding(); + + rmiBinding = modelFactories.getFactory(RMIBindingFactory.class).createRMIBinding(); + rmiBinding.setName(this.binding.getName()); + + URI uri = URI.create(binding.getURI()); + if (!uri.isAbsolute()) { + int port = 8085; + String host; + try { + host = InetAddress.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + host = "localhost"; + logger.warning("unable to determine host address, using localhost"); + } + ServerSocket socket; + try { + socket = new ServerSocket(0); + port = socket.getLocalPort(); + // host = socket.getInetAddress().getHostAddress(); + socket.close(); + } catch (IOException e) { + } + String bindURI = "http://" + host + ":" + port + binding.getURI(); + + // FIXME: We need to pass the full URI to the endpoint registry + binding.setURI(bindURI); + } + + rmiBinding.setURI(this.binding.getURI()); + + // create a copy of the endpoint but with the web service binding in + RuntimeEndpoint ep = null; + try { + ep = (RuntimeEndpoint)endpoint.clone(); + } catch (Exception ex){ + // we know we can clone endpoint references + } + ep.setBinding(rmiBinding); + + ProviderFactoryExtensionPoint providerFactories = extensionPoints.getExtensionPoint(ProviderFactoryExtensionPoint.class); + BindingProviderFactory providerFactory = (BindingProviderFactory) providerFactories.getProviderFactory(RMIBinding.class); + serviceBindingProvider = providerFactory.createServiceBindingProvider(ep); + + // Set the service binding provider so that it can be used to start/stop + ((RuntimeEndpoint) endpoint).setBindingProvider(serviceBindingProvider); + + logger.info("Service using RMI SCA Binding: " + rmiBinding.getURI()); + } + + public InterfaceContract getBindingInterfaceContract() { + return null; + } + + public boolean supportsOneWayInvocation() { + return false; + } + + public void start() { + if (!started) { + started = true; + serviceBindingProvider.start(); + } + } + + public void stop() { + if (started) { + started = false; + serviceBindingProvider.stop(); + } + } +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory new file mode 100644 index 0000000000..347e7b372c --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory @@ -0,0 +1,20 @@ +# 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. + +# Implementation class for the binding extension +org.apache.tuscany.sca.binding.sca.rmi.RMISCABindingProviderFactory;model=org.apache.tuscany.sca.assembly.DistributedSCABinding + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java new file mode 100644 index 0000000000..b68fe7fed4 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java @@ -0,0 +1,78 @@ +/* + * 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.sca.rmi; + + +import junit.framework.Assert; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class AsynchTestCase { + + public static Node nodeA; + public static Node nodeB; + + @BeforeClass + public static void init() throws Exception { + System.out.println("Setting up nodes"); + + try { + // create and start nodes + Contribution contrib = new Contribution("asynch", "./target/test-classes/asynchReference"); + nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA.start(); + + contrib = new Contribution("asynch", "./target/test-classes/asynchService"); + nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB.start(); + + } catch (Exception ex) { + System.err.println("Exception when creating domain " + ex.getMessage()); + ex.printStackTrace(System.err); + throw ex; + } + } + + @AfterClass + public static void destroy() throws Exception { + nodeA.stop(); + nodeB.stop(); + } + + @Test + public void testHelloWorldAsynch() throws Exception { + HelloWorldClient helloWorldClientB; + helloWorldClientB = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote"); + helloWorldClientB.getGreetings("fred"); + System.out.println("Sleeping ..."); + Thread.sleep(2000); + System.out.println("... Done"); + Assert.assertEquals("callback fred", HelloWorldClientCallbackOnewayRemoteImpl.result ); + + } + + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java new file mode 100644 index 0000000000..4c05006ba6 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java @@ -0,0 +1,82 @@ +/* + * 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.sca.rmi; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CallbackTestCase { + + public static Node nodeA; + public static Node nodeB; + + @BeforeClass + public static void init() throws Exception { + System.out.println("Setting up nodes"); + + try { + // create and start nodes + Contribution contrib = new Contribution("reference", "./target/test-classes/callbackReference"); + nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA.start(); + + contrib = new Contribution("service", "./target/test-classes/callbackService"); + nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB.start(); + + } catch (Exception ex) { + System.err.println("Exception when creating domain " + ex.getMessage()); + ex.printStackTrace(System.err); + throw ex; + } + } + + @AfterClass + public static void destroy() throws Exception { + nodeA.stop(); + nodeB.stop(); + } + + //@Test + public void testKeepServerRunning() throws Exception { + System.out.println("press enter to continue"); + System.in.read(); + } + + @Test + public void testHelloWorldCallbackLocal() throws Exception { + HelloWorldClient helloWorldClientB; + helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal"); + Assert.assertEquals("Hello callback fred", helloWorldClientB.getGreetings("fred")); + } + + @Test + public void testHelloWorldCallbackRemote() throws Exception { + HelloWorldClient helloWorldClientA; + helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote"); + Assert.assertEquals("Hello callback fred", helloWorldClientA.getGreetings("fred")); + } +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java new file mode 100644 index 0000000000..4f1ad18a31 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java @@ -0,0 +1,72 @@ +/* + * 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.sca.rmi; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class PromotionTestCase { + + + public static Node nodeA; + public static Node nodeB; + + @BeforeClass + public static void init() throws Exception { + System.out.println("Setting up nodes"); + + try { + // create and start nodes + Contribution contrib = new Contribution("reference", "./target/test-classes/promotionReference"); + nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA.start(); + + contrib = new Contribution("service", "./target/test-classes/promotionService"); + nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB.start(); + + } catch (Exception ex) { + System.err.println("Exception when creating domain " + ex.getMessage()); + ex.printStackTrace(System.err); + throw ex; + } + } + + @AfterClass + public static void destroy() throws Exception { + nodeA.stop(); + nodeB.stop(); + } + + @Test + public void testHelloWorldPromotion() throws Exception { + HelloWorldClient helloWorldClientA; + helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion"); + Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred"); + + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java new file mode 100644 index 0000000000..73354efbad --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java @@ -0,0 +1,110 @@ +/* + * 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.sca.rmi; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.oasisopen.sca.ServiceUnavailableException; + +public class SimpleTestCase { + + public static Node nodeA; + public static Node nodeB; + + @BeforeClass + public static void init() throws Exception { + System.out.println("Setting up nodes"); + + try { + // create and start nodes + Contribution contrib = new Contribution("reference", "./target/test-classes/simpleReference"); + nodeA = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeA.start(); + + contrib = new Contribution("service", "./target/test-classes/simpleService"); + nodeB = NodeFactory.newInstance().createNode("HelloWorld.composite", contrib); + nodeB.start(); + + } catch (Exception ex) { + System.err.println("Exception when creating domain " + ex.getMessage()); + ex.printStackTrace(System.err); + throw ex; + } + } + + @AfterClass + public static void destroy() throws Exception { + nodeA.stop(); + nodeB.stop(); + } + + @Test + public void testHelloWorldLocal() throws Exception { + HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocal"); + Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred"); + + } + + @Test + public void testHelloWorldRemote() throws Exception { + + HelloWorldClient helloWorldClientA; + helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemote"); + + try { + helloWorldClientA.getGreetings("fred"); + } catch (ServiceUnavailableException ex){ + Assert.fail(); + } + } + + @Test + public void testHelloWorldLocalAndRemote() throws Exception { + HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocalAndRemote"); + HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientLocalAndRemote"); + Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred"); + Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred"); + } + + @Test + public void testHelloWorldMultipleServices() throws Exception { + HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices"); + HelloWorldClient helloWorldClientA2 = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices2"); + HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientMultipleServices"); + Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred"); + Assert.assertEquals(helloWorldClientA2.getGreetings("fred"), "Hello fred"); + Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred"); + } + + @Test + public void testHelloWorldMultipleBindings() throws Exception { + HelloWorldClient helloWorldClientA; + helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleBindings"); + Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred"); + + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java new file mode 100644 index 0000000000..7c4cf4b0b7 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.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 org.apache.tuscany.sca.binding.sca.rmi.helloworld; + +import org.oasisopen.sca.annotation.Remotable; + + +@Remotable +public interface HelloWorldCallbackRemote { + + String getGreetingsCallbackRemote(String s); + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java new file mode 100644 index 0000000000..017acee582 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java @@ -0,0 +1,27 @@ +/* + * 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.sca.rmi.helloworld; + + +public interface HelloWorldClient { + + String getGreetings(String s); + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java new file mode 100644 index 0000000000..86f984e61a --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java @@ -0,0 +1,33 @@ +/* + * 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.sca.rmi.helloworld; + +import org.oasisopen.sca.annotation.Callback; +import org.oasisopen.sca.annotation.OneWay; +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +@Callback(HelloWorldCallbackRemote.class) +public interface HelloWorldServiceCallbackOnewayRemote { + + @OneWay + void getGreetingsRemote(String s); + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java new file mode 100644 index 0000000000..8e19fd7382 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.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.sca.rmi.helloworld; + +import org.oasisopen.sca.annotation.Callback; +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +@Callback(HelloWorldCallbackRemote.class) +public interface HelloWorldServiceCallbackRemote { + + String getGreetingsRemote(String s); + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java new file mode 100644 index 0000000000..b0d623e2e4 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java @@ -0,0 +1,27 @@ +/* + * 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.sca.rmi.helloworld; + + +public interface HelloWorldServiceLocal { + + String getGreetingsLocal(String s); + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java new file mode 100644 index 0000000000..ccb44694d9 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java @@ -0,0 +1,29 @@ +/* + * 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.sca.rmi.helloworld; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloWorldServiceRemote { + + String getGreetingsRemote(String s); + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java new file mode 100644 index 0000000000..5c8bb13f43 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java @@ -0,0 +1,29 @@ +/* + * 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.sca.rmi.helloworld; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloWorldServiceRemote2 { + + String getGreetingsRemote2(String s); + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java new file mode 100644 index 0000000000..1ff1792bb7 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.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.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackOnewayRemote; +import org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClientCallbackOnewayRemoteImpl implements HelloWorldClient { + + public static String result; + + @Reference + public HelloWorldServiceCallbackOnewayRemote helloWorldService; + + public String getGreetings(String s) { + helloWorldService.getGreetingsRemote(s); + return null; + } + + public String getGreetingsCallbackRemote(String s) { + result = "callback " + s; + return result; + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java new file mode 100644 index 0000000000..b17d8e2016 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java @@ -0,0 +1,42 @@ +/* + * 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.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackRemote; +import org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClientCallbackRemoteImpl implements HelloWorldClient { + + public static String result; + + @Reference + public HelloWorldServiceCallbackRemote helloWorldService; + + public String getGreetings(String s) { + return helloWorldService.getGreetingsRemote(s); + } + + public String getGreetingsCallbackRemote(String s) { + result = "callback " + s; + return result; + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java new file mode 100644 index 0000000000..e230326f5f --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.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 org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal; +import org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClientLocalImpl implements HelloWorldClient { + + @Reference + public HelloWorldServiceLocal helloWorldService; + + public String getGreetings(String s) { + return helloWorldService.getGreetingsLocal(s); + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java new file mode 100644 index 0000000000..77df8c2c39 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.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 org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote2; +import org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClientRemote2Impl implements HelloWorldClient { + + @Reference + public HelloWorldServiceRemote2 helloWorldService; + + public String getGreetings(String s) { + return helloWorldService.getGreetingsRemote2(s); + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java new file mode 100644 index 0000000000..8effa3ac36 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.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 org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote; +import org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClientRemoteImpl implements HelloWorldClient { + + @Reference + public HelloWorldServiceRemote helloWorldService; + + public String getGreetings(String s) { + return helloWorldService.getGreetingsRemote(s); + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java new file mode 100644 index 0000000000..2467ddab88 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.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 org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldCallbackRemote; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackOnewayRemote; +import org.oasisopen.sca.annotation.Callback; + +public class HelloWorldServiceCallbackOnewayRemoteImpl implements HelloWorldServiceCallbackOnewayRemote { + + @Callback + protected HelloWorldCallbackRemote theCallback; + + public void getGreetingsRemote(String s) { + theCallback.getGreetingsCallbackRemote(s); + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java new file mode 100644 index 0000000000..d1b75d0a2c --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java @@ -0,0 +1,39 @@ +/* + * 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.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldCallbackRemote; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackRemote; +import org.oasisopen.sca.annotation.Callback; + +public class HelloWorldServiceCallbackRemoteImpl implements HelloWorldServiceCallbackRemote { + + @Callback + protected HelloWorldCallbackRemote theCallback; + + public HelloWorldServiceCallbackRemoteImpl() { + System.out.println("Constructor"); + } + + public String getGreetingsRemote(String s) { + return "Hello " + theCallback.getGreetingsCallbackRemote(s); + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java new file mode 100644 index 0000000000..44e7efc668 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.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 org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal; + +public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal { + + public String getGreetingsLocal(String s) { + return "Hello " + s; + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java new file mode 100644 index 0000000000..88440de023 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java @@ -0,0 +1,41 @@ +/* + * 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.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote; +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote2; +import org.oasisopen.sca.annotation.Service; + +@Service({HelloWorldServiceRemote.class, HelloWorldServiceRemote2.class, HelloWorldServiceLocal.class} ) +public class HelloWorldServiceMultipleServicesImpl implements HelloWorldServiceLocal, HelloWorldServiceRemote, HelloWorldServiceRemote2 { + + public String getGreetingsLocal(String s) { + return "Hello " + s; + } + + public String getGreetingsRemote(String s) { + return "Hello " + s; + } + + public String getGreetingsRemote2(String s) { + return "Hello " + s; + } +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java new file mode 100644 index 0000000000..06dc2c3f79 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.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 org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl; + +import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote; + +public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote { + + public String getGreetingsRemote(String s) { + return "Hello " + s; + } + +} diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/HelloWorld.composite new file mode 100644 index 0000000000..4a6c87318d --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/HelloWorld.composite @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchReference/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/HelloWorld.composite new file mode 100644 index 0000000000..4e3e0c269b --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/HelloWorld.composite @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/asynchService/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/HelloWorld.composite new file mode 100644 index 0000000000..eae8b705d3 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/HelloWorld.composite @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackReference/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/HelloWorld.composite new file mode 100644 index 0000000000..dbbdc9b774 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/HelloWorld.composite @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/callbackService/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorld.composite new file mode 100644 index 0000000000..c8cc77001c --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorld.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorldComponent.composite new file mode 100644 index 0000000000..290ae8723b --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/HelloWorldComponent.composite @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionReference/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorld.composite new file mode 100644 index 0000000000..aec75574f7 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorld.composite @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorldComponent.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorldComponent.composite new file mode 100644 index 0000000000..3f7e8f5cfa --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/HelloWorldComponent.composite @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/promotionService/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/HelloWorld.composite new file mode 100644 index 0000000000..31b85329f1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/HelloWorld.composite @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleReference/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/HelloWorld.composite b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/HelloWorld.composite new file mode 100644 index 0000000000..9f0d212582 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/HelloWorld.composite @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..ac1d0a36c1 --- /dev/null +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime-rmi/src/test/resources/simpleService/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file -- cgit v1.2.3