summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes')
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java116
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java170
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java329
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java116
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java170
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java329
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/pom.xml44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/pom.xml44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java89
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java88
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml98
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java138
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jarbin0 -> 9625 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jarbin0 -> 8212 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jarbin0 -> 9432 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java93
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java103
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java292
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java106
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java61
286 files changed, 13725 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml
new file mode 100644
index 0000000000..626f0d1352
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml
@@ -0,0 +1,74 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-binding-sca-hazelcast</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes binding.sca Using Hazelcast Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ </includes>
+ <reportFormat>brief</reportFormat>
+ <useFile>true</useFile>
+ <forkMode>once</forkMode>
+ <argLine>-ea -Xmx256m</argLine>
+ <parallel>off</parallel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java
new file mode 100644
index 0000000000..ef2565b750
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.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.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Client {
+ String getName(String id);
+
+ String create(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
new file mode 100644
index 0000000000..96a0f2dadd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
@@ -0,0 +1,53 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Client.class)
+public class ClientImpl implements Client {
+ @Reference
+ protected Local local;
+
+ @Reference
+ protected Remote remote;
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
new file mode 100644
index 0000000000..f2b7b1e41d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
@@ -0,0 +1,70 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class Customer {
+ private String id;
+ private String name;
+
+ public Customer() {
+ }
+
+ /**
+ * @param id
+ * @param name
+ */
+ public Customer(String id, String name) {
+ super();
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return "Customer [id=" + id + ", name=" + name + "]";
+ }
+
+ public void dump(String prefix) {
+ System.out.print(prefix);
+ System.out.print(": ");
+ System.out.print(toString());
+ System.out.println(" @" + System.identityHashCode(this));
+ System.out.println(getClass().getClassLoader());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
new file mode 100644
index 0000000000..a6e80c9eca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
@@ -0,0 +1,64 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class CustomerNotFoundException extends Exception {
+ private String customerId;
+
+ /**
+ *
+ */
+ public CustomerNotFoundException() {
+ }
+
+ /**
+ * @param message
+ */
+ public CustomerNotFoundException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param cause
+ */
+ public CustomerNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public CustomerNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ public void setCustomerId(String customerId) {
+ this.customerId = customerId;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java
new file mode 100644
index 0000000000..0fe30c9d53
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.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.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Local {
+ String getName(Customer customer);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
new file mode 100644
index 0000000000..8783808334
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Local.class)
+public class LocalServiceImpl implements Local {
+
+ public String getName(Customer customer) {
+ if (customer == null) {
+ return null;
+ }
+ customer.dump("Local.getName()");
+ return customer.getName();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
new file mode 100644
index 0000000000..050d35007b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
@@ -0,0 +1,36 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ *
+ */
+@Remotable
+public interface Remote {
+ String generateId();
+
+ String getId(Customer customer);
+
+ Customer getCustomer(String id) throws CustomerNotFoundException;
+
+ Customer createCustomer(String id, String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
new file mode 100644
index 0000000000..6c432a500a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
@@ -0,0 +1,66 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Remote.class)
+@Scope("COMPOSITE")
+public class RemoteServiceImpl implements Remote {
+ private Map<String, Customer> customers = new HashMap<String, Customer>();
+
+ public String generateId() {
+ return UUID.randomUUID().toString();
+ }
+
+ @AllowsPassByReference
+ public String getId(Customer customer) {
+ customer.dump("Remote.getId()");
+ return customer.getId();
+ }
+
+ public Customer getCustomer(String id) throws CustomerNotFoundException {
+ Customer customer = customers.get(id);
+ if (customer == null) {
+ CustomerNotFoundException ex = new CustomerNotFoundException("Customer not found");
+ ex.setCustomerId(id);
+ throw ex;
+ }
+ customer.dump("Remote.getCustomer()");
+ return customer;
+ }
+
+ public Customer createCustomer(String id, String name) {
+ Customer customer = new Customer(id, name);
+ customer.dump("Remote.createCustomer()");
+ customers.put(id, customer);
+ return customer;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
new file mode 100644
index 0000000000..3573eea978
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.net.URI;
+
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ *
+ */
+public class SCAClientImpl implements Client {
+ private Local local;
+ private Remote remote;
+
+ public SCAClientImpl(String domainURI) throws Exception {
+ SCAClientFactory factory = SCAClientFactory.newInstance(URI.create(domainURI));
+ local = factory.getService(Local.class, "LocalComponent/Local");
+ remote = factory.getService(Remote.class, "RemoteComponent/Remote");
+ }
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
new file mode 100644
index 0000000000..b04cc33023
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
@@ -0,0 +1,30 @@
+<?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
+ * 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://client"
+ name="Client">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.ClientImpl" />
+ <reference name="local" target="LocalComponent" />
+ <reference name="remote" target="RemoteComponent" />
+ </component>
+
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
new file mode 100644
index 0000000000..fe282d291c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
@@ -0,0 +1,31 @@
+<?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
+ * 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://service"
+ name="Service">
+
+ <component name="LocalComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.LocalServiceImpl" />
+ </component>
+
+ <component name="RemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.RemoteServiceImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
new file mode 100644
index 0000000000..9efa1a99ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * 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.axis2;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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;
+
+// @Ignore("TUSCANY-3138")
+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/ws/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/ws/asynchService");
+ nodeB = NodeFactory.getInstance().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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
new file mode 100644
index 0000000000..efa84e92a5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * 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.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.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;
+
+// @Ignore("TUSCANY-3138")
+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/ws/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/callbackService");
+ nodeB = NodeFactory.getInstance().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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
new file mode 100644
index 0000000000..45d28140b4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
@@ -0,0 +1,74 @@
+/*
+ * 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.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.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.Ignore;
+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/ws/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/promotionService");
+ nodeB = NodeFactory.getInstance().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
+ @Ignore
+ 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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
new file mode 100644
index 0000000000..a5d6529895
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.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/ws/simpleReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/simpleService");
+ nodeB = NodeFactory.getInstance().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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
new file mode 100644
index 0000000000..f7ab3dfe98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface HelloWorldCallbackRemote {
+
+ String getGreetingsCallbackRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..3d25d37708
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+
+public interface HelloWorldClient {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
new file mode 100644
index 0000000000..a469d197d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
new file mode 100644
index 0000000000..3f5a21fddd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
new file mode 100644
index 0000000000..49e5232b31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+
+public interface HelloWorldServiceLocal {
+
+ String getGreetingsLocal(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
new file mode 100644
index 0000000000..ccc77c142b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
new file mode 100644
index 0000000000..c2be798d1a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote2 {
+
+ String getGreetingsRemote2(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..9355aece1f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
new file mode 100644
index 0000000000..efc47aa94d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
new file mode 100644
index 0000000000..6ed813ff0a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java
new file mode 100644
index 0000000000..ba70573efb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
new file mode 100644
index 0000000000..a87d6eb49a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..3dc0b12b82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
new file mode 100644
index 0000000000..b15d6dea80
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java
new file mode 100644
index 0000000000..c4347b084a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+
+public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
new file mode 100644
index 0000000000..846bff02e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java
new file mode 100644
index 0000000000..d69f442879
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+
+public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
new file mode 100644
index 0000000000..cbcc06056a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * 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");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchService");
+ nodeB = NodeFactory.getInstance().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();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
new file mode 100644
index 0000000000..dccd2dace8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
@@ -0,0 +1,84 @@
+/*
+ * 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");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/callbackService");
+ nodeB = NodeFactory.getInstance().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();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ //@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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
new file mode 100644
index 0000000000..7aac95a8ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * 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");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/promotionService");
+ nodeB = NodeFactory.getInstance().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();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+
+ }
+
+ @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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
new file mode 100644
index 0000000000..f748beb6cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
@@ -0,0 +1,116 @@
+/*
+ * 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 {
+
+ private static NodeFactory factory;
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ factory = NodeFactory.getInstance();
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/simpleReference");
+ nodeA = factory.createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/simpleService");
+ nodeB = factory.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();
+ factory.destroy();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
new file mode 100644
index 0000000000..fcd0d39162
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
@@ -0,0 +1,170 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+/**
+ * Test binding.sca in the same classloader
+ */
+public class BindingSCATestCase {
+ static final String DOMAIN_URI = "my-domain";
+ private static final String REGISTRY_URI = "tuscany:bindingScaTestDomain";
+ private static final String PKG = "org/apache/tuscany/sca/itest/bindingsca/";
+ private static final String CLIENT = "Client.composite";
+ private static final String SERVICE = "Service.composite";
+ private static final String ROOT = new File("target/classes/" + PKG).toURI().toString();
+
+ /**
+ * One NodeFactory and two nodes
+ */
+ @Test
+ public void testOneFactoryTwoNodes() {
+ NodeFactory factory1 = NodeFactory.getInstance();
+ Node node1 = createClientNode(factory1);
+ Node node2 = createServiceNode(factory1);
+ node1.start();
+ node2.start();
+ try {
+ runClient(node1);
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Create the service node
+ * @param factory
+ * @return
+ */
+ static Node createServiceNode(NodeFactory factory) {
+ NodeConfiguration config2 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node2").addContribution("c2", ROOT)
+ .addDeploymentComposite("c2", SERVICE).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+
+ Node node2 = factory.createNode(config2);
+ return node2;
+ }
+
+ /**
+ * Create the client node
+ * @param factory
+ * @return
+ */
+ static Node createClientNode(NodeFactory factory) {
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+ Node node1 = factory.createNode(config1);
+ return node1;
+ }
+
+ /**
+ * Two node factories and two nodes
+ */
+ @Test
+ public void testTwoFactoriesTwoNodes() throws Exception {
+ NodeFactory factory1 = NodeFactory.newInstance();
+ Node node1 = createClientNode(factory1);
+ NodeFactory factory2 = NodeFactory.newInstance();
+ Node node2 = createServiceNode(factory2);
+ node1.start();
+ node2.start();
+ Thread.sleep(1000);
+ try {
+ // This call doesn't require the Local service, it should be successful
+ createCustomer(node1);
+ try {
+ runClient(node1);
+ // We cannot make local call to remote endpoints
+ Assert.fail("ServiceRuntimeException should have been thrown.");
+ } catch (ServiceRuntimeException e) {
+ // ignore
+ }
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory2.destroy();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Run the client
+ * @param node
+ */
+ static void runClient(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ runClient(client);
+ }
+
+ static void runClient(Client client) {
+ String id = client.create("Ray");
+ Assert.assertEquals("Ray", client.getName(id));
+ }
+
+ static void runClientNotFound(Client client) {
+ String id = "not-there";
+ Assert.assertNull(client.getName(id));
+ }
+
+ static String createCustomer(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ String id = client.create("John");
+ Assert.assertNotNull(id);
+ return id;
+ }
+
+ /**
+ * One node factory and one node for both composites
+ */
+ @Test
+ public void testOneFactoryOneNode() {
+ NodeFactory factory = NodeFactory.getInstance();
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).addDeploymentComposite("c1", SERVICE);
+
+ Node node1 = factory.createNode(config1);
+ node1.start();
+ try {
+ runClient(node1);
+ } finally {
+ node1.stop();
+ factory.destroy();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
new file mode 100644
index 0000000000..7255697d4b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+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;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Customer class
+ */
+public class ClientNodeSharedCustomerTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+ private static NodeFactory factory;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ if (factory != null) {
+ factory.destroy();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
new file mode 100644
index 0000000000..51fafae32c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+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;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientNodeSharedLocalTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName());
+ runner.beforeClass();
+ NodeFactory factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
new file mode 100644
index 0000000000..b8ff0c58ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Customer class
+ */
+public class ClientSharedCustomerTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
new file mode 100644
index 0000000000..633e1a767c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientSharedLocalTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName(), CustomerNotFoundException.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @Test
+ public void testClientNotFound() throws Exception {
+ BindingSCATestCase.runClientNotFound(client);
+ }
+
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
new file mode 100644
index 0000000000..1cba2b57c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ServiceNode {
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ /* System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ */
+ NodeFactory factory = NodeFactory.getInstance();
+ serviceNode = BindingSCATestCase.createServiceNode(factory).start();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
new file mode 100644
index 0000000000..c0960ffe95
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
@@ -0,0 +1,329 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A helper class that can be used to run an SCA JUnit test case. The test case will run in an isolated class loader.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestCaseRunner {
+
+ private ClassLoader classLoader;
+ private Class<?> testSuiteClass;
+ private Object testSuite;
+ private Class<?> testResultClass;
+ private Class<?> testCaseClass;
+ private Object testCase;
+
+ private Class<?> beforeAnnotation;
+ private Class<?> beforeClassAnnotation;
+ private Class<?> afterAnnotation;
+ private Class<?> afterClassAnnotation;
+ private Class<?> junit4AdapterClass;
+ private Class<?> junit3TestCaseClass;
+
+ /**
+ * Constructs a new TestCase runner.
+ *
+ * @param testClass
+ */
+ public TestCaseRunner(Class<?> testClass, String... isolatedClasses) {
+ try {
+ ClassLoader tccl = setupClassLoader(testClass, isolatedClasses);
+
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ testCaseClass = Class.forName(testClass.getName(), true, classLoader);
+ testCase = testCaseClass.newInstance();
+ ClassLoader testClassLoader = testCaseClass.getClassLoader();
+
+ junit3TestCaseClass = Class.forName("junit.framework.TestCase", true, testClassLoader);
+
+ testSuiteClass = Class.forName("junit.framework.TestSuite", true, testClassLoader);
+ Constructor<?> testSuiteConstructor = testSuiteClass.getConstructor(Class.class);
+ testSuite = testSuiteConstructor.newInstance(testCaseClass);
+
+ testResultClass = Class.forName("junit.framework.TestResult", true, testClassLoader);
+
+ try {
+ beforeAnnotation = Class.forName("org.junit.Before", true, testClassLoader);
+ afterAnnotation = Class.forName("org.junit.After", true, testClassLoader);
+ beforeClassAnnotation = Class.forName("org.junit.BeforeClass", true, testClassLoader);
+ afterClassAnnotation = Class.forName("org.junit.AfterClass", true, testClassLoader);
+ junit4AdapterClass = Class.forName("junit.framework.JUnit4TestAdapter", true, testClassLoader);
+ } catch (Exception e) {
+ // Unexpected
+ throw new AssertionError(e);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private ClassLoader setupClassLoader(Class<?> testClass, String... isolatedClasses) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ classLoader = testClass.getClassLoader();
+ if (classLoader instanceof URLClassLoader) {
+ URL[] urls = ((URLClassLoader)classLoader).getURLs();
+ classLoader = new ClassLoaderImpl(urls, classLoader, isolatedClasses);
+ } else if (classLoader == tccl || classLoader.getParent() == tccl) {
+ classLoader = new URLClassLoader(new URL[0], classLoader);
+ } else {
+ classLoader = tccl;
+ }
+ return tccl;
+ }
+
+ /**
+ * Run the test case
+ */
+ public void run() {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ if (junit3TestCaseClass.isAssignableFrom(testCaseClass)) {
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = testSuiteClass.getMethod("run", testResultClass);
+ runMethod.invoke(testSuite, testResult);
+ } else {
+ Object junit4Adapter = junit4AdapterClass.getConstructor(Class.class).newInstance(testCaseClass);
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = junit4AdapterClass.getMethod("run", testResultClass);
+ runMethod.invoke(junit4Adapter, testResult);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the setUp method
+ */
+ public void setUp() {
+ execute("setUp");
+ }
+
+ /**
+ * Invoke the before methods
+ */
+ public void before() {
+ execute(beforeAnnotation);
+ }
+
+ /**
+ * Invoke the beforeClass methods
+ */
+ public void beforeClass() {
+ execute(beforeClassAnnotation);
+ }
+
+ /**
+ * Invoke the tearDown method
+ */
+ public void tearDown() {
+ execute("tearDown");
+ }
+
+ /**
+ * Invoke the after methods
+ */
+ public void after() {
+ execute(afterAnnotation);
+ }
+
+ /**
+ * Invoke the afterClass methods
+ */
+ public void afterClass() {
+ execute(afterClassAnnotation);
+ }
+
+ /**
+ * Invoke the specified test method.
+ */
+ public void run(String methodName) {
+ execute(methodName);
+ }
+
+ /**
+ * Invoke the methods annotated with the specified annotation.
+ */
+ private void execute(Class<?> annotationClass) {
+ if (annotationClass == null) {
+ throw new RuntimeException(new NoSuchMethodException());
+ }
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ for (Method method : testCaseClass.getDeclaredMethods()) {
+ for (Annotation annotation : method.getAnnotations()) {
+ if (annotation.annotationType() == annotationClass) {
+ method.invoke(testCase);
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the specified method
+ */
+ private void execute(String methodName) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+ Method setUpMethod = testCaseClass.getDeclaredMethod(methodName);
+ setUpMethod.setAccessible(true);
+ setUpMethod.invoke(testCase);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ public static class ClassLoaderImpl extends URLClassLoader {
+ private Set<String> isolatedClasses = new HashSet<String>();
+
+ /**
+ * @param urls
+ * @param parent
+ */
+ public ClassLoaderImpl(URL[] urls, ClassLoader parent, String... sharedClasses) {
+ super(urls, parent);
+ this.isolatedClasses.addAll(Arrays.asList(sharedClasses));
+ }
+
+ @Override
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ if (!isolatedClasses.contains(name)) {
+ return super.loadClass(name, resolve);
+ } else {
+ Class<?> cls = findLoadedClass(name);
+ if (cls == null) {
+ cls = findClass(name);
+ }
+ if (resolve) {
+ resolveClass(cls);
+ }
+ return cls;
+ }
+ }
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..8c825ca805
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..79b1a5d794
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..e8924d2728
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..4edc8df5cd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..823cab4f56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..088fd616f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..454e9c55cf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..a313fb8f68
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..4151749523
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..37af7625ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite
@@ -0,0 +1,85 @@
+<?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"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ <!-- tuscany:binding.rmi name="rmiBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/ -->
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..e797a0aa9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..079ee49380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..1d5630f3d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..ded3766d49
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..4513f21acf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..22c20ff94a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..e6a7d776c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..0393280625
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..f4d2789ff7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..7e6311a22d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite
@@ -0,0 +1,84 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ <binding.ws name="wsBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/>
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml
new file mode 100644
index 0000000000..a7ae8ed797
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml
@@ -0,0 +1,70 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-binding-sca-tribes</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes binding.sca Using Tribes Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java
new file mode 100644
index 0000000000..ef2565b750
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.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.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Client {
+ String getName(String id);
+
+ String create(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
new file mode 100644
index 0000000000..96a0f2dadd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
@@ -0,0 +1,53 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Client.class)
+public class ClientImpl implements Client {
+ @Reference
+ protected Local local;
+
+ @Reference
+ protected Remote remote;
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
new file mode 100644
index 0000000000..f2b7b1e41d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
@@ -0,0 +1,70 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class Customer {
+ private String id;
+ private String name;
+
+ public Customer() {
+ }
+
+ /**
+ * @param id
+ * @param name
+ */
+ public Customer(String id, String name) {
+ super();
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return "Customer [id=" + id + ", name=" + name + "]";
+ }
+
+ public void dump(String prefix) {
+ System.out.print(prefix);
+ System.out.print(": ");
+ System.out.print(toString());
+ System.out.println(" @" + System.identityHashCode(this));
+ System.out.println(getClass().getClassLoader());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
new file mode 100644
index 0000000000..a6e80c9eca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
@@ -0,0 +1,64 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class CustomerNotFoundException extends Exception {
+ private String customerId;
+
+ /**
+ *
+ */
+ public CustomerNotFoundException() {
+ }
+
+ /**
+ * @param message
+ */
+ public CustomerNotFoundException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param cause
+ */
+ public CustomerNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public CustomerNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ public void setCustomerId(String customerId) {
+ this.customerId = customerId;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java
new file mode 100644
index 0000000000..0fe30c9d53
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.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.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Local {
+ String getName(Customer customer);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
new file mode 100644
index 0000000000..8783808334
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Local.class)
+public class LocalServiceImpl implements Local {
+
+ public String getName(Customer customer) {
+ if (customer == null) {
+ return null;
+ }
+ customer.dump("Local.getName()");
+ return customer.getName();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
new file mode 100644
index 0000000000..050d35007b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
@@ -0,0 +1,36 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ *
+ */
+@Remotable
+public interface Remote {
+ String generateId();
+
+ String getId(Customer customer);
+
+ Customer getCustomer(String id) throws CustomerNotFoundException;
+
+ Customer createCustomer(String id, String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
new file mode 100644
index 0000000000..6c432a500a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
@@ -0,0 +1,66 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Remote.class)
+@Scope("COMPOSITE")
+public class RemoteServiceImpl implements Remote {
+ private Map<String, Customer> customers = new HashMap<String, Customer>();
+
+ public String generateId() {
+ return UUID.randomUUID().toString();
+ }
+
+ @AllowsPassByReference
+ public String getId(Customer customer) {
+ customer.dump("Remote.getId()");
+ return customer.getId();
+ }
+
+ public Customer getCustomer(String id) throws CustomerNotFoundException {
+ Customer customer = customers.get(id);
+ if (customer == null) {
+ CustomerNotFoundException ex = new CustomerNotFoundException("Customer not found");
+ ex.setCustomerId(id);
+ throw ex;
+ }
+ customer.dump("Remote.getCustomer()");
+ return customer;
+ }
+
+ public Customer createCustomer(String id, String name) {
+ Customer customer = new Customer(id, name);
+ customer.dump("Remote.createCustomer()");
+ customers.put(id, customer);
+ return customer;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
new file mode 100644
index 0000000000..3573eea978
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.net.URI;
+
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ *
+ */
+public class SCAClientImpl implements Client {
+ private Local local;
+ private Remote remote;
+
+ public SCAClientImpl(String domainURI) throws Exception {
+ SCAClientFactory factory = SCAClientFactory.newInstance(URI.create(domainURI));
+ local = factory.getService(Local.class, "LocalComponent/Local");
+ remote = factory.getService(Remote.class, "RemoteComponent/Remote");
+ }
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
new file mode 100644
index 0000000000..b04cc33023
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
@@ -0,0 +1,30 @@
+<?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
+ * 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://client"
+ name="Client">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.ClientImpl" />
+ <reference name="local" target="LocalComponent" />
+ <reference name="remote" target="RemoteComponent" />
+ </component>
+
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
new file mode 100644
index 0000000000..fe282d291c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
@@ -0,0 +1,31 @@
+<?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
+ * 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://service"
+ name="Service">
+
+ <component name="LocalComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.LocalServiceImpl" />
+ </component>
+
+ <component name="RemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.RemoteServiceImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
new file mode 100644
index 0000000000..9efa1a99ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * 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.axis2;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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;
+
+// @Ignore("TUSCANY-3138")
+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/ws/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/ws/asynchService");
+ nodeB = NodeFactory.getInstance().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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
new file mode 100644
index 0000000000..efa84e92a5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * 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.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.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;
+
+// @Ignore("TUSCANY-3138")
+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/ws/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/callbackService");
+ nodeB = NodeFactory.getInstance().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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
new file mode 100644
index 0000000000..45d28140b4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
@@ -0,0 +1,74 @@
+/*
+ * 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.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.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.Ignore;
+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/ws/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/promotionService");
+ nodeB = NodeFactory.getInstance().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
+ @Ignore
+ 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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
new file mode 100644
index 0000000000..a5d6529895
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.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/ws/simpleReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/simpleService");
+ nodeB = NodeFactory.getInstance().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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
new file mode 100644
index 0000000000..f7ab3dfe98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface HelloWorldCallbackRemote {
+
+ String getGreetingsCallbackRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..3d25d37708
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+
+public interface HelloWorldClient {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
new file mode 100644
index 0000000000..a469d197d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
new file mode 100644
index 0000000000..3f5a21fddd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
new file mode 100644
index 0000000000..49e5232b31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+
+public interface HelloWorldServiceLocal {
+
+ String getGreetingsLocal(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
new file mode 100644
index 0000000000..ccc77c142b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
new file mode 100644
index 0000000000..c2be798d1a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote2 {
+
+ String getGreetingsRemote2(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..9355aece1f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
new file mode 100644
index 0000000000..efc47aa94d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
new file mode 100644
index 0000000000..6ed813ff0a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java
new file mode 100644
index 0000000000..ba70573efb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
new file mode 100644
index 0000000000..a87d6eb49a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..3dc0b12b82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
new file mode 100644
index 0000000000..b15d6dea80
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java
new file mode 100644
index 0000000000..c4347b084a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+
+public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
new file mode 100644
index 0000000000..846bff02e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java
new file mode 100644
index 0000000000..d69f442879
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/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.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+
+public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
new file mode 100644
index 0000000000..cbcc06056a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * 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");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchService");
+ nodeB = NodeFactory.getInstance().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();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
new file mode 100644
index 0000000000..dccd2dace8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
@@ -0,0 +1,84 @@
+/*
+ * 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");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/callbackService");
+ nodeB = NodeFactory.getInstance().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();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ //@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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
new file mode 100644
index 0000000000..7aac95a8ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * 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");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/promotionService");
+ nodeB = NodeFactory.getInstance().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();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+
+ }
+
+ @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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
new file mode 100644
index 0000000000..f748beb6cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
@@ -0,0 +1,116 @@
+/*
+ * 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 {
+
+ private static NodeFactory factory;
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ factory = NodeFactory.getInstance();
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/simpleReference");
+ nodeA = factory.createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/simpleService");
+ nodeB = factory.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();
+ factory.destroy();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/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/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
new file mode 100644
index 0000000000..05a8c3455c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
@@ -0,0 +1,170 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+/**
+ * Test binding.sca in the same classloader
+ */
+public class BindingSCATestCase {
+ static final String DOMAIN_URI = "my-domain";
+ private static final String REGISTRY_URI = "tribes://228.0.0.100:50000";
+ private static final String PKG = "org/apache/tuscany/sca/itest/bindingsca/";
+ private static final String CLIENT = "Client.composite";
+ private static final String SERVICE = "Service.composite";
+ private static final String ROOT = new File("target/classes/" + PKG).toURI().toString();
+
+ /**
+ * One NodeFactory and two nodes
+ */
+ @Test
+ public void testOneFactoryTwoNodes() {
+ NodeFactory factory1 = NodeFactory.getInstance();
+ Node node1 = createClientNode(factory1);
+ Node node2 = createServiceNode(factory1);
+ node1.start();
+ node2.start();
+ try {
+ runClient(node1);
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Create the service node
+ * @param factory
+ * @return
+ */
+ static Node createServiceNode(NodeFactory factory) {
+ NodeConfiguration config2 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node2").addContribution("c2", ROOT)
+ .addDeploymentComposite("c2", SERVICE).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+
+ Node node2 = factory.createNode(config2);
+ return node2;
+ }
+
+ /**
+ * Create the client node
+ * @param factory
+ * @return
+ */
+ static Node createClientNode(NodeFactory factory) {
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+ Node node1 = factory.createNode(config1);
+ return node1;
+ }
+
+ /**
+ * Two node factories and two nodes
+ */
+ @Test
+ public void testTwoFactoriesTwoNodes() throws Exception {
+ NodeFactory factory1 = NodeFactory.newInstance();
+ Node node1 = createClientNode(factory1);
+ NodeFactory factory2 = NodeFactory.newInstance();
+ Node node2 = createServiceNode(factory2);
+ node1.start();
+ node2.start();
+ Thread.sleep(1000);
+ try {
+ // This call doesn't require the Local service, it should be successful
+ createCustomer(node1);
+ try {
+ runClient(node1);
+ // We cannot make local call to remote endpoints
+ Assert.fail("ServiceRuntimeException should have been thrown.");
+ } catch (ServiceRuntimeException e) {
+ // ignore
+ }
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory2.destroy();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Run the client
+ * @param node
+ */
+ static void runClient(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ runClient(client);
+ }
+
+ static void runClient(Client client) {
+ String id = client.create("Ray");
+ Assert.assertEquals("Ray", client.getName(id));
+ }
+
+ static void runClientNotFound(Client client) {
+ String id = "not-there";
+ Assert.assertNull(client.getName(id));
+ }
+
+ static String createCustomer(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ String id = client.create("John");
+ Assert.assertNotNull(id);
+ return id;
+ }
+
+ /**
+ * One node factory and one node for both composites
+ */
+ @Test
+ public void testOneFactoryOneNode() {
+ NodeFactory factory = NodeFactory.getInstance();
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).addDeploymentComposite("c1", SERVICE);
+
+ Node node1 = factory.createNode(config1);
+ node1.start();
+ try {
+ runClient(node1);
+ } finally {
+ node1.stop();
+ factory.destroy();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
new file mode 100644
index 0000000000..7255697d4b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+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;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Customer class
+ */
+public class ClientNodeSharedCustomerTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+ private static NodeFactory factory;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ if (factory != null) {
+ factory.destroy();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
new file mode 100644
index 0000000000..51fafae32c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+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;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientNodeSharedLocalTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName());
+ runner.beforeClass();
+ NodeFactory factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
new file mode 100644
index 0000000000..b8ff0c58ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Customer class
+ */
+public class ClientSharedCustomerTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
new file mode 100644
index 0000000000..633e1a767c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientSharedLocalTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName(), CustomerNotFoundException.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @Test
+ public void testClientNotFound() throws Exception {
+ BindingSCATestCase.runClientNotFound(client);
+ }
+
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
new file mode 100644
index 0000000000..1cba2b57c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ServiceNode {
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ /* System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ */
+ NodeFactory factory = NodeFactory.getInstance();
+ serviceNode = BindingSCATestCase.createServiceNode(factory).start();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
new file mode 100644
index 0000000000..c0960ffe95
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
@@ -0,0 +1,329 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A helper class that can be used to run an SCA JUnit test case. The test case will run in an isolated class loader.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestCaseRunner {
+
+ private ClassLoader classLoader;
+ private Class<?> testSuiteClass;
+ private Object testSuite;
+ private Class<?> testResultClass;
+ private Class<?> testCaseClass;
+ private Object testCase;
+
+ private Class<?> beforeAnnotation;
+ private Class<?> beforeClassAnnotation;
+ private Class<?> afterAnnotation;
+ private Class<?> afterClassAnnotation;
+ private Class<?> junit4AdapterClass;
+ private Class<?> junit3TestCaseClass;
+
+ /**
+ * Constructs a new TestCase runner.
+ *
+ * @param testClass
+ */
+ public TestCaseRunner(Class<?> testClass, String... isolatedClasses) {
+ try {
+ ClassLoader tccl = setupClassLoader(testClass, isolatedClasses);
+
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ testCaseClass = Class.forName(testClass.getName(), true, classLoader);
+ testCase = testCaseClass.newInstance();
+ ClassLoader testClassLoader = testCaseClass.getClassLoader();
+
+ junit3TestCaseClass = Class.forName("junit.framework.TestCase", true, testClassLoader);
+
+ testSuiteClass = Class.forName("junit.framework.TestSuite", true, testClassLoader);
+ Constructor<?> testSuiteConstructor = testSuiteClass.getConstructor(Class.class);
+ testSuite = testSuiteConstructor.newInstance(testCaseClass);
+
+ testResultClass = Class.forName("junit.framework.TestResult", true, testClassLoader);
+
+ try {
+ beforeAnnotation = Class.forName("org.junit.Before", true, testClassLoader);
+ afterAnnotation = Class.forName("org.junit.After", true, testClassLoader);
+ beforeClassAnnotation = Class.forName("org.junit.BeforeClass", true, testClassLoader);
+ afterClassAnnotation = Class.forName("org.junit.AfterClass", true, testClassLoader);
+ junit4AdapterClass = Class.forName("junit.framework.JUnit4TestAdapter", true, testClassLoader);
+ } catch (Exception e) {
+ // Unexpected
+ throw new AssertionError(e);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private ClassLoader setupClassLoader(Class<?> testClass, String... isolatedClasses) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ classLoader = testClass.getClassLoader();
+ if (classLoader instanceof URLClassLoader) {
+ URL[] urls = ((URLClassLoader)classLoader).getURLs();
+ classLoader = new ClassLoaderImpl(urls, classLoader, isolatedClasses);
+ } else if (classLoader == tccl || classLoader.getParent() == tccl) {
+ classLoader = new URLClassLoader(new URL[0], classLoader);
+ } else {
+ classLoader = tccl;
+ }
+ return tccl;
+ }
+
+ /**
+ * Run the test case
+ */
+ public void run() {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ if (junit3TestCaseClass.isAssignableFrom(testCaseClass)) {
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = testSuiteClass.getMethod("run", testResultClass);
+ runMethod.invoke(testSuite, testResult);
+ } else {
+ Object junit4Adapter = junit4AdapterClass.getConstructor(Class.class).newInstance(testCaseClass);
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = junit4AdapterClass.getMethod("run", testResultClass);
+ runMethod.invoke(junit4Adapter, testResult);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the setUp method
+ */
+ public void setUp() {
+ execute("setUp");
+ }
+
+ /**
+ * Invoke the before methods
+ */
+ public void before() {
+ execute(beforeAnnotation);
+ }
+
+ /**
+ * Invoke the beforeClass methods
+ */
+ public void beforeClass() {
+ execute(beforeClassAnnotation);
+ }
+
+ /**
+ * Invoke the tearDown method
+ */
+ public void tearDown() {
+ execute("tearDown");
+ }
+
+ /**
+ * Invoke the after methods
+ */
+ public void after() {
+ execute(afterAnnotation);
+ }
+
+ /**
+ * Invoke the afterClass methods
+ */
+ public void afterClass() {
+ execute(afterClassAnnotation);
+ }
+
+ /**
+ * Invoke the specified test method.
+ */
+ public void run(String methodName) {
+ execute(methodName);
+ }
+
+ /**
+ * Invoke the methods annotated with the specified annotation.
+ */
+ private void execute(Class<?> annotationClass) {
+ if (annotationClass == null) {
+ throw new RuntimeException(new NoSuchMethodException());
+ }
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ for (Method method : testCaseClass.getDeclaredMethods()) {
+ for (Annotation annotation : method.getAnnotations()) {
+ if (annotation.annotationType() == annotationClass) {
+ method.invoke(testCase);
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the specified method
+ */
+ private void execute(String methodName) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+ Method setUpMethod = testCaseClass.getDeclaredMethod(methodName);
+ setUpMethod.setAccessible(true);
+ setUpMethod.invoke(testCase);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ public static class ClassLoaderImpl extends URLClassLoader {
+ private Set<String> isolatedClasses = new HashSet<String>();
+
+ /**
+ * @param urls
+ * @param parent
+ */
+ public ClassLoaderImpl(URL[] urls, ClassLoader parent, String... sharedClasses) {
+ super(urls, parent);
+ this.isolatedClasses.addAll(Arrays.asList(sharedClasses));
+ }
+
+ @Override
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ if (!isolatedClasses.contains(name)) {
+ return super.loadClass(name, resolve);
+ } else {
+ Class<?> cls = findLoadedClass(name);
+ if (cls == null) {
+ cls = findClass(name);
+ }
+ if (resolve) {
+ resolveClass(cls);
+ }
+ return cls;
+ }
+ }
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..8c825ca805
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..79b1a5d794
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..e8924d2728
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..4edc8df5cd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..823cab4f56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..54fb359ba0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..454e9c55cf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..a313fb8f68
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..4151749523
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..37af7625ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite
@@ -0,0 +1,85 @@
+<?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"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ <!-- tuscany:binding.rmi name="rmiBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/ -->
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..e797a0aa9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..079ee49380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..1d5630f3d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..ded3766d49
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..4513f21acf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..22c20ff94a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..e6a7d776c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..0393280625
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..f4d2789ff7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..7e6311a22d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite
@@ -0,0 +1,84 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ <binding.ws name="wsBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/>
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml
new file mode 100644
index 0000000000..f2733b7b7d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml
@@ -0,0 +1,59 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-node-domain-node</artifactId>
+ <name>Apache Tuscany SCA iTest Node DomainNode</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+<!--
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+-->
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..021a653c36
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java
@@ -0,0 +1,37 @@
+/*
+ * 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 helloworld;
+
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ @Reference
+ protected HelloWorldService hwService;
+
+ public String getGreetings(String name) {
+ return "Hello " + hwService.getGreetings(name);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..636f7699ed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..32c2d0b907
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.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 helloworld;
+
+import javax.jws.WebService;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..34da25216d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/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:hw="http://helloworld">
+ <deployable composite="hw:helloworldws" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..fae44b642d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite
@@ -0,0 +1,47 @@
+<?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"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://helloworld"
+ xmlns:hw="http://helloworld"
+ xmlns:wsdli="http://www.w3.org/ns/wsdl-instance"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="helloworldws">
+
+ <component name="HelloWorldClientComponent">
+ <implementation.java class="helloworld.HelloWorldClientImpl" />
+ <service name="HelloWorldService">
+ <binding.sca/>
+ </service>
+ <reference name="hwService" target="HelloWorldServiceComponent">
+<!--
+ <binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/>
+-->
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent">
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ <service name="HelloWorldService">
+ <tuscany:binding.rmi uri="rmi://duffuri"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java
new file mode 100644
index 0000000000..028db4cf33
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java
@@ -0,0 +1,90 @@
+/*
+ * 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 helloworld;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class DomainNodeTestCase{
+
+ private Node node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = TuscanyRuntime.newInstance().createNode("default");
+ node.installContribution("helloworld", "target/classes", null, null);
+ try {
+ node.startComposite("helloworld", "helloworld.composite");
+ } catch (Exception ex) {
+ System.out.println("Caught exception on composite start : " + ex);
+ }
+ }
+
+ @Ignore
+ @Test
+ public void testWaitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Shutting down");
+ }
+
+ @Test
+ public void testContributionUninstall() throws IOException, NoSuchServiceException {
+ List<String> installedContributions = node.getInstalledContributionURIs();
+ System.out.println(installedContributions);
+
+ assertEquals(1, installedContributions.size());
+
+ try {
+ node.stopCompositeAndUninstallUnused("helloworld", "helloworld.composite");
+ } catch (Exception ex) {
+ System.out.println("Caught exception on composite stop : " + ex);
+ }
+
+ installedContributions = node.getInstalledContributionURIs();
+ assertEquals(0, installedContributions.size());
+ }
+
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/pom.xml
new file mode 100644
index 0000000000..f2144e3ded
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-client</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..2619dc269b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.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 itest.nodes;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldImpl implements Helloworld {
+
+ @Reference
+ public Helloworld service;
+
+ @Init
+ public void initialize() throws Exception{
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e295015a40
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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:HelloworldClient"/>
+ <import.java package="itest.nodes"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite
new file mode 100644
index 0000000000..3c4ed03448
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite
@@ -0,0 +1,29 @@
+<?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="HelloworldClient">
+
+ <component name="HelloworldClient">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ <reference name="service" target="HelloworldService"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml
new file mode 100644
index 0000000000..904b84e2a9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml
@@ -0,0 +1,39 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld IFaces</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java
new file mode 100644
index 0000000000..a0710281c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.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 itest.nodes;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name) throws Exception;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..2205b4e8fe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/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">
+ <export.java package="itest.nodes"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/pom.xml
new file mode 100644
index 0000000000..0b767c15b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service-a</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service A</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..2619dc269b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.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 itest.nodes;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldImpl implements Helloworld {
+
+ @Reference
+ public Helloworld service;
+
+ @Init
+ public void initialize() throws Exception{
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..bba92e6ca3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/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/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ServiceA"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite
new file mode 100644
index 0000000000..55122d2d6c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite
@@ -0,0 +1,29 @@
+<?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/200903"
+ targetNamespace="http://itest"
+ name="ServiceA">
+
+ <component name="ServiceA">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ <reference name="service" target="ServiceA"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml
new file mode 100644
index 0000000000..34a0be500a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml
@@ -0,0 +1,39 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</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.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java
new file mode 100644
index 0000000000..f08412d4bf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.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 itest.nodes.sac;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name) throws Exception;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/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/tags/2.0.1-RC1/testing/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/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/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/tags/2.0.1-RC1/testing/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/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/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/tags/2.0.1-RC1/testing/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/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/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/tags/2.0.1-RC1/testing/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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml
new file mode 100644
index 0000000000..7a021816cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml
@@ -0,0 +1,49 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service-b</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service B</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..b1d5a8235a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.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 itest.nodes;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloworldImpl implements Helloworld {
+
+ @Reference
+ protected Helloworld service;
+
+ public String sayHello(String name) throws Exception {
+ return service.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..4405cca18e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/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/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ServiceB"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite
new file mode 100644
index 0000000000..02cff882a7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite
@@ -0,0 +1,29 @@
+<?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/200903"
+ targetNamespace="http://itest"
+ name="ServiceB">
+
+ <component name="ServiceB">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ <reference name="service" target="ServiceC"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml
new file mode 100644
index 0000000000..55bf576501
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml
@@ -0,0 +1,49 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-Serivce-c</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service C</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..81f7e1747d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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;
+
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..3ff86f946b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/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/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ServiceC"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite
new file mode 100644
index 0000000000..d88db09b43
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite
@@ -0,0 +1,28 @@
+<?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/200903"
+ targetNamespace="http://itest"
+ name="ServiceC">
+
+ <component name="ServiceC">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml
new file mode 100644
index 0000000000..cd4f429976
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml
@@ -0,0 +1,43 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..a27e752fd7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.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;
+
+public class HelloworldImpl 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/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..b02141ef26
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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:HelloworldService"/>
+ <import.java package="itest.nodes"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite
new file mode 100644
index 0000000000..5334caeb55
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite
@@ -0,0 +1,28 @@
+<?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="HelloworldService">
+
+ <component name="HelloworldService">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml
new file mode 100644
index 0000000000..b5f8ca81f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml
@@ -0,0 +1,51 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm-hazelcast-client</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM Using Hazelcast and client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java
new file mode 100644
index 0000000000..1e59e3e34e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java
@@ -0,0 +1,112 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.hazelcast.client.HazelcastClient;
+import com.hazelcast.core.IMap;
+
+/**
+ */
+public class ClientTestCase{
+
+ private static String domainURI = "uri:OneNodeTestCase?bind=127.0.0.1:14829";
+ private static Node node;
+ private static HazelcastClient client;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = TuscanyRuntime.newInstance().createNode(domainURI);
+ node.installContribution("../helloworld-iface/target/classes");
+ String c1 = node.installContribution("../helloworld-service/target/classes");
+ String c2 = node.installContribution("../helloworld-client/target/classes");
+ node.startDeployables(c1);
+ node.startDeployables(c2);
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ client = HazelcastClient.newHazelcastClient("OneNodeTestCase", "tuscany", "127.0.0.1:14829");
+ IMap<Object, Object> map = client.getMap("OneNodeTestCase/Endpoints");
+
+ assertNotNull(map);
+ assertEquals(2, map.size());
+ Object ep1 = map.get("HelloworldService#service-binding(Helloworld/Helloworld)");
+// System.out.println((RuntimeEndpointImpl)ep1);
+ assertNotNull(ep1);
+ assertTrue(ep1 instanceof RuntimeEndpointImpl);
+ Object ep2 = map.get("HelloworldClient#service-binding(Helloworld/Helloworld)");
+ assertNotNull(ep2);
+ }
+
+ //@Test
+ public void testTime() throws Exception {
+ long start = System.currentTimeMillis();
+ long count = 100;
+ for (int i=0; i<count; i++) {
+ testNode();
+ client.shutdown();
+ }
+ long avg = (System.currentTimeMillis() - start) / count;
+ System.out.println("Average for " + count + " client connects " + avg);
+ }
+
+ @Test
+ public void testBadPassword() throws Exception {
+ try {
+ client = HazelcastClient.newHazelcastClient("OneNodeTestCase", "IncorrectPassword", "127.0.0.1:14829");
+ fail();
+ } catch (Exception e) {
+ //expected
+ }
+ }
+
+ @Test
+ public void testBadIP() throws Exception {
+ try {
+ client = HazelcastClient.newHazelcastClient("OneNodeTestCase", "IncorrectPassword", "127.0.0.99:9999");
+ fail();
+ } catch (Exception e) {
+ //expected
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (client != null) {
+ client.shutdown();
+ }
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml
new file mode 100644
index 0000000000..befaa40d92
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml
@@ -0,0 +1,54 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm-hazelcast</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM Using Hazelcast Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-service-and-client</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java
new file mode 100644
index 0000000000..3755d0b365
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.sac.Helloworld;
+
+import java.net.URI;
+
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeOneContributionTestCase{
+
+ private static URI domainURI = URI.create("tuscany:OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service-and-client/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..c8ae6f3762
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static URI domainURI = URI.create("OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.java
new file mode 100644
index 0000000000..23c4a62916
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodeTestCase{
+
+ private static URI domainURI = URI.create("TwoNodeTestCase");
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-iface/target/classes");
+ serviceNode.start();
+ clientNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java
new file mode 100644
index 0000000000..a7e2bcf1c1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java
@@ -0,0 +1,89 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+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.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoRemoteNodesTestCase{
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.newInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-service/target/classes", "../helloworld-iface/target/classes");
+ serviceNode.start();
+
+ clientNode = NodeFactory.getInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ }
+
+ @Ignore // Fails with Hazelcast 1.9.2.2, investigating...
+ @Test
+ public void testRemoteClient() throws Exception {
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml
new file mode 100644
index 0000000000..4b23d1336c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml
@@ -0,0 +1,82 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm-tribes</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM Using Tribes Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ </includes>
+ <reportFormat>brief</reportFormat>
+ <useFile>false</useFile>
+ <forkMode>once</forkMode>
+ <argLine>-ea -Xmx256m</argLine>
+ <parallel>off</parallel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..e55e8f63e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static URI domainURI = URI.create("OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-client/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java
new file mode 100644
index 0000000000..2d920c340a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodeTestCase{
+
+ private static URI domainURI = URI.create("TwoNodeTestCase");
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes");
+ serviceNode.start();
+ clientNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-client/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java
new file mode 100644
index 0000000000..888b4df156
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoRemoteNodesTestCase{
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.newInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-service/target/classes");
+ serviceNode.start();
+
+ clientNode = NodeFactory.getInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-client/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+// Helloworld scaClientService = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldService");
+// assertNotNull(scaClientService);
+// assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml
new file mode 100644
index 0000000000..ab660730d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml
@@ -0,0 +1,53 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..c8ae6f3762
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static URI domainURI = URI.create("OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.java
new file mode 100644
index 0000000000..23c4a62916
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+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.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodeTestCase{
+
+ private static URI domainURI = URI.create("TwoNodeTestCase");
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-iface/target/classes");
+ serviceNode.start();
+ clientNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml
new file mode 100644
index 0000000000..5132f9065a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml
@@ -0,0 +1,48 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-node-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One Node Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..93f5863010
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,88 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+
+import itest.nodes.Helloworld;
+
+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;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(
+ new Contribution("iface", getJar("../helloworld-iface/target")),
+ new Contribution("service", getJar("../helloworld-service/target")),
+ new Contribution("client", getJar("../helloworld-client/target")));
+ node.start();
+ }
+
+ /**
+ * Get the jar in the target folder without being dependent on the version name to
+ * make tuscany releases easier
+ */
+ private static String getJar(String targetDirectory) {
+ File f = new File(targetDirectory);
+ for (File file : f.listFiles()) {
+ if (file.getName().endsWith(".jar")) {
+ return file.toURI().toString();
+ }
+ }
+ throw new IllegalStateException("Can't find jar in: " + targetDirectory);
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+
+ // Ideally this would use the SCAClient API but leaving that tillwe have the basics working
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml
new file mode 100644
index 0000000000..06dd6b86eb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml
@@ -0,0 +1,64 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-nodes</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes</name>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+ <modules>
+ <module>helloworld-iface</module>
+ <module>helloworld-service</module>
+ <module>helloworld-client</module>
+ <module>helloworld-service-and-client</module>
+<!--
+ <module>helloworld-service-a</module>
+ <module>helloworld-service-b</module>
+ <module>helloworld-service-c</module>
+-->
+ <module>one-jvm</module>
+ <module>one-jvm-hazelcast</module>
+ <module>one-jvm-hazelcast-client</module>
+ <module>one-jvm-tribes</module>
+ <module>binding-sca-hazelcast</module>
+ <!-- module>binding-sca-tribes</module -->
+ <module>one-node-test</module>
+<!-- failing now and then with RMI already bound problem
+ <module>two-nodes-two-vms-hazelcast</module>
+ <module>two-nodes-test</module>
+-->
+
+<!--
+ <module>three-nodes-three-vms-test</module>
+-->
+ <module>domain-node</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml
new file mode 100644
index 0000000000..ec5477e235
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml
@@ -0,0 +1,71 @@
+<?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>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-remote-stop-start</artifactId>
+ <name>Apache Tuscany SCA iTest Remote Stop Start</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-maven-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <domainURI>uri:StartStopTestCase?bind=127.0.0.1:9876</domainURI>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java
new file mode 100644
index 0000000000..f97d2c3a83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..4fd909af82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldServiceImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println("init: " + sayHello("world"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java
new file mode 100644
index 0000000000..d5b9dcf311
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface RemoteHelloworldService {
+
+ String sayHelloRemote(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..d37c93857d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite
@@ -0,0 +1,29 @@
+<?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"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e178823296
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/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:Helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java
new file mode 100644
index 0000000000..933b9f1bea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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 test.scaclient;
+
+import itest.HelloworldService;
+
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.monitor.ValidationException;
+import org.apache.tuscany.sca.runtime.ActivationException;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class StopStartTestCase {
+
+ @Test
+ public void startStopInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+ Node node1 = runtime.createNode("uri:StartStopTestCase?wka=127.0.0.1:9876");
+ Assert.assertEquals("Hello Amelia", node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia"));
+
+ String curi = node1.getInstalledContributionURIs().get(0);
+
+ node1.stopComposite(curi, "Helloworld.composite");
+ try {
+ node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia");
+ Assert.fail();
+ } catch (NoSuchServiceException e) {
+ // expected
+ }
+
+ List<String> nodes = node1.getNodeNames();
+ nodes.remove(node1.getLocalNodeName());
+ String remoteNode = nodes.get(0);
+ node1.startComposite(curi, "Helloworld.composite", remoteNode);
+
+// TUSCANY-3870: this next invoke doesn't work:
+// Assert.assertEquals("Hello Amelia", node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml
new file mode 100644
index 0000000000..3d77230541
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml
@@ -0,0 +1,38 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <target name="run">
+
+ <parallel failonany="true">
+
+ <daemons>
+ <ant antfile="server.xml"/>
+ </daemons>
+
+ <sequential>
+ <sleep seconds="4"/>
+ <ant antfile="client.xml"/>
+ </sequential>
+
+ </parallel>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml
new file mode 100644
index 0000000000..8e7c744940
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml
@@ -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.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath};./target/test-classes"
+ classname="itest.Client"
+ fork="true"
+ failonerror="true">
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml
new file mode 100644
index 0000000000..df9593dc53
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml
@@ -0,0 +1,104 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-three-nodes-three-vms-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Three Nodes Three VMs Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-launcher</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-runtime-rmi</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="maven.test.skip">
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml
new file mode 100644
index 0000000000..dc18cc8ce0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml
@@ -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.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true">
+ <arg value="-node"/>
+ <arg value="./server-config.xml"/>
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml
new file mode 100644
index 0000000000..d4c8909126
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domain="http://domain1"
+ domainRegistry="tribes:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/itest-nodes-helloworld-iface-2.0.jar"/>
+ <contribution uri="client" location="../helloworld-service-a/target/itest-nodes-helloworld-service-a-2.0.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="service-a.composite"/>
+ </contribution>
+
+</node>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml
new file mode 100644
index 0000000000..d557a31b64
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domain="http://domain1"
+ domainRegistry="tribes:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/classes"/>
+ <contribution uri="service" location="../helloworld-service-b/target/classes">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="service-b.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml
new file mode 100644
index 0000000000..ba642c5ed0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domain="http://domain1"
+ domainRegistry="tribes:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/classes"/>
+ <contribution uri="service" location="../helloworld-service-c/target/classes">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="service-c.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java
new file mode 100644
index 0000000000..6ef30fe43f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java
@@ -0,0 +1,65 @@
+/*
+ * 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;
+
+import java.io.File;
+
+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 ServiceA {
+
+ private static Node sericeNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ sericeNode = factory.createNode(new File("service-a-config.xml").toURI().toURL());
+
+ try {
+ sericeNode.start();
+ } catch (Exception ex){
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (sericeNode != null) {
+ sericeNode.stop();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ ServiceA.setUpBeforeClass();
+ ServiceA.tearDownAfterClass();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java
new file mode 100644
index 0000000000..67a8e5d92e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java
@@ -0,0 +1,55 @@
+/*
+ * 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;
+
+import java.io.File;
+
+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 ServiceB {
+
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ serviceNode = factory.createNode(new File("service-b-config.xml").toURI().toURL());
+ serviceNode.start();
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+ synchronized (this) {
+ this.wait();
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java
new file mode 100644
index 0000000000..d716b5cd98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java
@@ -0,0 +1,55 @@
+/*
+ * 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;
+
+import java.io.File;
+
+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 ServiceC {
+
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ serviceNode = factory.createNode(new File("service-c-config.xml").toURI().toURL());
+ serviceNode.start();
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+ synchronized (this) {
+ this.wait();
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml
new file mode 100644
index 0000000000..7e83ff658e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml
@@ -0,0 +1,54 @@
+<!--
+ * 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 name="itest-nodes-two-jvms-hazelcast" default="run">
+
+ <target name="run">
+ <parallel failonany="true">
+
+ <!-- start a node that will be part of the domain -->
+ <java classpath="../../../../distribution/all/target/apache-tuscany-sca-all-2.0.dir/tuscany-sca-2.0/features/tuscany-sca-manifest.jar:./target/classes"
+ classname="org.apache.tuscany.sca.impl.Tuscany"
+ fork="true"
+ failonerror="true">
+ <arg value="domain1"/>
+ <arg value="nodeService"/>
+ <arg value="8088"/>
+ </java>
+
+ <sequential>
+ <!-- give the first node a chance to start -->
+ <sleep seconds="5"/>
+ <!-- start a second node that automatically tries to call a service in the first node -->
+ <java classpath="../../../../distribution/all/target/apache-tuscany-sca-all-2.0.dir/tuscany-sca-2.0/features/tuscany-sca-manifest.jar:./target/classes"
+ classname="org.apache.tuscany.sca.impl.Tuscany"
+ fork="true"
+ failonerror="true">
+ <arg value="domain1"/>
+ <arg value="nodeClient"/>
+ </java>
+ <!-- use a HTTP GET to ping the first node to tell it to stop -->
+ <get src="http://localhost:8088"
+ dest="target/deamon.txt"
+ ignoreerrors="true"/>
+ </sequential>
+
+ </parallel>
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml
new file mode 100644
index 0000000000..f40977406d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml
@@ -0,0 +1,98 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-two-jvm-hazelcast</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Two JVM using Hazelcast registry</name>
+
+ <dependencies>
+ <!-- runtime -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <!-- test artifacts -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="maven.test.skip">
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java
new file mode 100644
index 0000000000..5c6ca7476e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java
@@ -0,0 +1,138 @@
+/*
+ * 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.impl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URL;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Main class for Tuscany. Just looking at what it means to read config from a directory structure.
+ *
+ */
+public class Tuscany {
+
+ public static void main(String[] args) throws Exception {
+ String domainName = args[0];
+ String nodeName = args[1];
+ int deamonPort = -1;
+
+ if (args.length > 2){
+ deamonPort = Integer.parseInt(args[2]);
+ }
+
+ // find the domain directory
+ File currentDirectory = new File(".");
+ File domainDirectory = findDirectory(currentDirectory, domainName);
+ System.out.println("Domain: " + domainDirectory.getPath());
+
+ // find a sub directory that ends in nodeName
+ File nodeDirectory = findDirectory(currentDirectory, nodeName);
+ System.out.println("Node: " + nodeDirectory.getPath());
+
+ // start a node with the node configuration
+/* don't know how to start the node using the following
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+ Node node = tuscanyRuntime.createNodeFromXML(nodeDirectory.getPath() +
+ File.separator +
+ "node.xml");
+*/
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+
+ URL nodeConfigURL = nodeDirectory.toURI().resolve("node.xml").toURL();
+ Node node = nodeFactory.createNode(nodeConfigURL);
+
+ try {
+ node.start();
+
+ // for testing we're going to set up a deamon that listens for
+ // a shutdown message on a specified port (well it actually just
+ // waits for a client to connect to the port as that's all we need
+ // for now). If no port is specified then just stop straight away
+
+ if (deamonPort >= 0){
+ // Its a runtime that has to act as a deamon
+ ServerSocket serverSocket = null;
+
+ try {
+ serverSocket = new ServerSocket(deamonPort);
+ } catch (IOException e) {
+ System.out.println("Can't create a ServerSocket on port: " + deamonPort);
+ return;
+ }
+
+ // all we're doing here is waiting for a connection. If we wanted to implement
+ // a real deamon we should perhaps listen to what's coming in over the resulting socket
+ // and see if a shutdown has been requested
+ Socket clientSocket = null;
+ try {
+ clientSocket = serverSocket.accept();
+ } catch (IOException e) {
+ System.out.println("Accept failed on port: " + deamonPort);
+ return;
+ }
+ }
+
+ } finally {
+ node.stop();
+ }
+ }
+
+ /**
+ * Just walks down the tree (depth first) looking for a directory ending in the
+ * name.
+ */
+ private static File findDirectory(File currentDirectory, String name){
+ File directory = null;
+
+ if (currentDirectory.getPath().endsWith(name)){
+ directory = currentDirectory;
+ } else {
+ File[] subDirectories = currentDirectory.listFiles(new DirectoryFilter());
+ for (File aDirectory : subDirectories) {
+ directory = findDirectory(aDirectory, name);
+
+ if (directory != null){
+ break;
+ }
+ }
+ }
+
+ return directory;
+ }
+
+ private static class DirectoryFilter implements FilenameFilter {
+
+ public boolean accept(File dir, String name) {
+ if(new File(dir, name).isDirectory()) {
+ return true;
+ }
+
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jar
new file mode 100644
index 0000000000..c98214fc83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jar
new file mode 100644
index 0000000000..455de9c58a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jar
new file mode 100644
index 0000000000..28e3e680e9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml
new file mode 100644
index 0000000000..81f82a9590
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/node1"
+ domain="default"
+ domainRegistry="tuscany:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface-contribution.jar"/>
+ <contribution uri="client" location="../helloworld-client-contribution.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-client.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml
new file mode 100644
index 0000000000..5d8620498a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode2"
+ domain="default"
+ domainRegistry="tuscany:default?listen=127.0.0.1:14820">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface-contribution.jar"/>
+ <contribution uri="service" location="../helloworld-service-contribution.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-service.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml
new file mode 100644
index 0000000000..02a0b19533
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml
@@ -0,0 +1,59 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-two-nodes-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Two Nodes Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
new file mode 100644
index 0000000000..6da4c1f7e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
@@ -0,0 +1,93 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.io.File;
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ClientNode {
+ private final static String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200912";
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class);
+ runner.beforeClass();
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ NodeFactory factory = NodeFactory.newInstance();
+ NodeConfiguration conf =
+ factory.createNodeConfiguration().setURI("clientNode").
+ addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8085/sca https://localhost:9085/sca")
+ .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8086/ws")
+ .addContribution("client", new File("../helloworld-client/target/classes").toURI().toString());
+ clientNode = factory.createNode(conf).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @Test
+ @Ignore("SCAClient needs to leverage the EndpointRegistry to invoke services that are not hosted on the local node")
+ public void testCalculatorClientAPI() throws Exception {
+ Helloworld service = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java
new file mode 100644
index 0000000000..4b034d89e0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+import java.io.File;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ServiceNode {
+ private final static String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200912";
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ NodeFactory factory = NodeFactory.newInstance();
+ NodeConfiguration conf =
+ factory.createNodeConfiguration().setURI("serviceNode")
+ .addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8087/sca")
+ .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8088/ws")
+ .addContribution("service", new File("../helloworld-service/target/classes").toURI().toString());
+ serviceNode = factory.createNode(conf).start();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java
new file mode 100644
index 0000000000..998492734b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java
@@ -0,0 +1,103 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import itest.nodes.Helloworld;
+
+import java.io.File;
+
+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.Test;
+
+/**
+ * Tests using two nodes and stopping and restarting a service node.
+ */
+public class StopStartNodesTestCase {
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @Test
+ public void testCalculator() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+ serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
+ serviceNode.start();
+ clientNode = factory.createNode(new Contribution("client", getJar("../helloworld-client/target")));
+ clientNode.start();
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ serviceNode.stop();
+
+ client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+
+ try {
+ client.sayHello("Petra");
+ fail();
+ } catch (Exception e) {
+ // expected
+ // TODO: better exception than NPE
+ }
+
+ serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
+ serviceNode.start();
+
+ client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ /**
+ * Get the jar in the target folder without being dependent on the version name to
+ * make tuscany releases easier
+ */
+ private static String getJar(String targetDirectory) {
+ File f = new File(targetDirectory);
+ for (File file : f.listFiles()) {
+ if (file.getName().endsWith(".jar")) {
+ return file.toURI().toString();
+ }
+ }
+ throw new IllegalStateException("Can't find jar in: " + targetDirectory);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java
new file mode 100644
index 0000000000..7dfa6e66cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java
@@ -0,0 +1,292 @@
+/*
+ * 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;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * A helper class that can be used to run an SCA JUnit test case. The test case will run in an isolated class loader.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestCaseRunner {
+
+ private ClassLoader classLoader;
+ private Class<?> testSuiteClass;
+ private Object testSuite;
+ private Class<?> testResultClass;
+ private Class<?> testCaseClass;
+ private Object testCase;
+
+ private Class<?> beforeAnnotation;
+ private Class<?> beforeClassAnnotation;
+ private Class<?> afterAnnotation;
+ private Class<?> afterClassAnnotation;
+ private Class<?> junit4AdapterClass;
+ private Class<?> junit3TestCaseClass;
+
+ /**
+ * Constructs a new TestCase runner.
+ *
+ * @param testClass
+ */
+ public TestCaseRunner(Class<?> testClass) {
+ try {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ classLoader = testClass.getClassLoader();
+ if (classLoader instanceof URLClassLoader) {
+ URL[] urls = ((URLClassLoader)classLoader).getURLs();
+ classLoader = new URLClassLoader(urls, classLoader.getParent());
+ } else if (classLoader == tccl || classLoader.getParent() == tccl) {
+ classLoader = new URLClassLoader(new URL[0], classLoader);
+ } else {
+ classLoader = tccl;
+ }
+
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ testCaseClass = Class.forName(testClass.getName(), true, classLoader);
+ testCase = testCaseClass.newInstance();
+ ClassLoader testClassLoader = testCaseClass.getClassLoader();
+
+ junit3TestCaseClass = Class.forName("junit.framework.TestCase", true, testClassLoader);
+
+ testSuiteClass = Class.forName("junit.framework.TestSuite", true, testClassLoader);
+ Constructor<?> testSuiteConstructor = testSuiteClass.getConstructor(Class.class);
+ testSuite = testSuiteConstructor.newInstance(testCaseClass);
+
+ testResultClass = Class.forName("junit.framework.TestResult", true, testClassLoader);
+
+ try {
+ beforeAnnotation = Class.forName("org.junit.Before", true, testClassLoader);
+ afterAnnotation = Class.forName("org.junit.After", true, testClassLoader);
+ beforeClassAnnotation = Class.forName("org.junit.BeforeClass", true, testClassLoader);
+ afterClassAnnotation = Class.forName("org.junit.AfterClass", true, testClassLoader);
+ junit4AdapterClass = Class.forName("junit.framework.JUnit4TestAdapter", true, testClassLoader);
+ } catch (Exception e) {
+ // Unexpected
+ throw new AssertionError(e);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Run the test case
+ */
+ public void run() {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ if (junit3TestCaseClass.isAssignableFrom(testCaseClass)) {
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = testSuiteClass.getMethod("run", testResultClass);
+ runMethod.invoke(testSuite, testResult);
+ } else {
+ Object junit4Adapter = junit4AdapterClass.getConstructor(Class.class).newInstance(testCaseClass);
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = junit4AdapterClass.getMethod("run", testResultClass);
+ runMethod.invoke(junit4Adapter, testResult);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the setUp method
+ */
+ public void setUp() {
+ execute("setUp");
+ }
+
+ /**
+ * Invoke the before methods
+ */
+ public void before() {
+ execute(beforeAnnotation);
+ }
+
+ /**
+ * Invoke the beforeClass methods
+ */
+ public void beforeClass() {
+ execute(beforeClassAnnotation);
+ }
+
+ /**
+ * Invoke the tearDown method
+ */
+ public void tearDown() {
+ execute("tearDown");
+ }
+
+ /**
+ * Invoke the after methods
+ */
+ public void after() {
+ execute(afterAnnotation);
+ }
+
+ /**
+ * Invoke the afterClass methods
+ */
+ public void afterClass() {
+ execute(afterClassAnnotation);
+ }
+
+ /**
+ * Invoke the specified test method.
+ */
+ public void run(String methodName) {
+ execute(methodName);
+ }
+
+ /**
+ * Invoke the methods annotated with the specified annotation.
+ */
+ private void execute(Class<?> annotationClass) {
+ if (annotationClass == null) {
+ throw new RuntimeException(new NoSuchMethodException());
+ }
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ for (Method method : testCaseClass.getDeclaredMethods()) {
+ for (Annotation annotation : method.getAnnotations()) {
+ if (annotation.annotationType() == annotationClass) {
+ method.invoke(testCase);
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the specified method
+ */
+ private void execute(String methodName) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+ Method setUpMethod = testCaseClass.getDeclaredMethod(methodName);
+ setUpMethod.setAccessible(true);
+ setUpMethod.invoke(testCase);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
new file mode 100644
index 0000000000..80c36e5ee9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
@@ -0,0 +1,106 @@
+/*
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.io.File;
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodesTestCase {
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ NodeFactory factory = NodeFactory.getInstance();
+ NodeConfiguration configuration1 =
+ factory.createNodeConfiguration().setURI("serviceNode")
+ .addContribution("service", getJar("../helloworld-service/target"));
+ serviceNode = factory.createNode(configuration1).start();
+
+ NodeConfiguration configuration2 =
+ factory.createNodeConfiguration().setURI("clientNode")
+ .addContribution("client", getJar("../helloworld-client/target"));
+ clientNode = factory.createNode(configuration2).start();
+ }
+
+ /**
+ * Get the jar in the target folder without being dependent on the version name to
+ * make tuscany releases easier
+ */
+ private static String getJar(String targetDirectory) {
+ File f = new File(targetDirectory);
+ for (File file : f.listFiles()) {
+ if (file.getName().endsWith(".jar")) {
+ return file.toURI().toString();
+ }
+ }
+ throw new IllegalStateException("Can't find jar in: " + targetDirectory);
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @Test
+ public void testCalculatorClientAPI() throws Exception {
+ Helloworld service = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml
new file mode 100644
index 0000000000..fa7e963e87
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml
@@ -0,0 +1,38 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <target name="run">
+
+ <parallel failonany="true">
+
+ <daemons>
+ <ant antfile="server.xml"/>
+ </daemons>
+
+ <sequential>
+ <sleep seconds="10"/>
+ <ant antfile="client.xml"/>
+ </sequential>
+
+ </parallel>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml
new file mode 100644
index 0000000000..3800a5e338
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domainRegistry = "tribes://228.0.0.100:50000"
+ domain="http://domain1">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/itest-nodes-helloworld-iface-2.0.jar"/>
+ <contribution uri="client" location="../helloworld-client/target/itest-nodes-helloworld-client-2.0.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-client.composite"/>
+ </contribution>
+
+</node>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml
new file mode 100644
index 0000000000..8e7c744940
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml
@@ -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.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath};./target/test-classes"
+ classname="itest.Client"
+ fork="true"
+ failonerror="true">
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml
new file mode 100644
index 0000000000..bad670d99e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml
@@ -0,0 +1,104 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-two-nodes-two-vms-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Two Nodes Two VMs Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-launcher</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="maven.test.skip">
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml
new file mode 100644
index 0000000000..590cf3bddb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode2"
+ domainRegistry = "tribes://228.0.0.100:50000"
+ domain="http://domain1">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/classes"/>
+ <contribution uri="service" location="../helloworld-service/target/classes">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-service.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml
new file mode 100644
index 0000000000..05a5aa16e9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml
@@ -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.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true">
+ <sysproperty key="org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding" value="{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi"/>
+ <arg value="-node"/>
+ <arg value="./server-config.xml"/>
+ <arg value="-ttl"/>
+ <arg value="15000"/>
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
new file mode 100644
index 0000000000..eef3362c10
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
@@ -0,0 +1,69 @@
+/*
+ * 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;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+import org.apache.tuscany.sca.domain.node.DomainNode;
+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 Client {
+
+ private static Node clientNode;
+// private static DomainNode clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ clientNode = factory.createNode(new File("client-config.xml").toURI().toURL());
+
+ try {
+ clientNode.start();
+ } catch (Exception ex){
+ ex.printStackTrace();
+ throw ex;
+ }
+
+// clientNode = new DomainNode("tribes:default", new String []{"../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"});
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ Client.setUpBeforeClass();
+ Client.tearDownAfterClass();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
new file mode 100644
index 0000000000..7323c2c122
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
@@ -0,0 +1,61 @@
+/*
+ * 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;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+import org.apache.tuscany.sca.domain.node.DomainNode;
+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 Service {
+
+ private static Node serviceNode;
+// private static DomainNode serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL());
+ serviceNode.start();
+
+// serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"});
+
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+ synchronized (this) {
+ this.wait();
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}