From fb3dd9a9095abc40027318b1712d0184f6d60e73 Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 30 Oct 2009 08:00:47 +0000 Subject: Delete old M4 branch and start again to pick up all the recent trunk changes git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@831223 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/bpel/helloworld-reference/pom.xml | 288 ------- .../src/test/java/greetings/GreetingsService.java | 31 - .../test/java/greetings/GreetingsServiceImpl.java | 33 - .../src/test/java/greetings/GreetingsTestCase.java | 65 -- .../test/java/helloworld/HelloWorldService.java | 29 - .../java/helloworld/HelloWorldServiceImpl.java | 47 -- .../test/java/helloworld/HelloWorldTestCase.java | 64 -- .../test/resources/greetings/greetings.composite | 32 - .../src/test/resources/greetings/greetings.wsdl | 87 -- .../src/test/resources/helloworld/helloworld.bpel | 84 -- .../test/resources/helloworld/helloworld.composite | 36 - .../src/test/resources/helloworld/helloworld.wsdl | 94 --- .../src/test/resources/log4j.properties | 36 - .../itest/bpel/helloworld-ws/pom.xml | 178 ---- .../src/test/java/helloworld/HelloWorld.java | 45 - .../test/java/helloworld/HelloWorldTestCase.java | 71 -- .../src/test/resources/helloworld/helloworld.bpel | 66 -- .../test/resources/helloworld/helloworld.composite | 32 - .../src/test/resources/helloworld/helloworld.wsdl | 82 -- .../src/test/resources/log4j.properties | 36 - .../sca-java-2.0-M4/itest/bpel/helloworld/pom.xml | 270 ------ .../src/test/java/helloworld/HelloWorld.java | 45 - .../test/java/helloworld/HelloWorldTestCase.java | 73 -- .../src/test/resources/helloworld/helloworld.bpel | 78 -- .../test/resources/helloworld/helloworld.composite | 36 - .../src/test/resources/helloworld/helloworld.wsdl | 94 --- .../helloworld/src/test/resources/log4j.properties | 36 - branches/sca-java-2.0-M4/itest/bpel/pom.xml | 39 - branches/sca-java-2.0-M4/itest/builder/pom.xml | 119 --- .../tuscany/sca/itest/builder/ComponentDImpl.java | 43 - .../ComponentDReferenceMultiplicityImpl.java | 48 -- .../tuscany/sca/itest/builder/ComponentEImpl.java | 36 - .../tuscany/sca/itest/builder/ComponentFImpl.java | 36 - .../apache/tuscany/sca/itest/builder/Service3.java | 34 - .../tuscany/sca/itest/builder/Service3a.java | 34 - .../scenario1/META-INF/sca-contribution.xml | 23 - .../main/resources/scenario1/scenario1.composite | 45 - .../main/resources/scenario1/scenario1a.composite | 47 -- .../scenario10/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario10/scenario10.composite | 62 -- .../resources/scenario10/scenario10a.composite | 61 -- .../src/main/resources/scenario10/service3.wsdl | 63 -- .../scenario11/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario11/scenario11.composite | 59 -- .../resources/scenario11/scenario11a.composite | 64 -- .../src/main/resources/scenario11/service3.wsdl | 63 -- .../scenario12/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario12/scenario12.composite | 58 -- .../resources/scenario12/scenario12a.composite | 64 -- .../scenario13/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario13/scenario13.composite | 58 -- .../resources/scenario13/scenario13a.composite | 64 -- .../scenario2/META-INF/sca-contribution.xml | 23 - .../main/resources/scenario2/scenario2.composite | 45 - .../main/resources/scenario2/scenario2a.composite | 47 -- .../scenario3/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario3/scenario3.composite | 44 - .../main/resources/scenario3/scenario3a.composite | 48 -- .../scenario4/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario4/scenario4.composite | 44 - .../main/resources/scenario4/scenario4a.composite | 48 -- .../scenario5/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario5/scenario5.composite | 46 -- .../main/resources/scenario5/scenario5a.composite | 47 -- .../src/main/resources/scenario5/scenarios.wsdl | 63 -- .../scenario6/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario6/scenario6.composite | 47 -- .../main/resources/scenario6/scenario6a.composite | 47 -- .../src/main/resources/scenario6/scenarios.wsdl | 63 -- .../scenario7/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario7/scenario7.composite | 45 - .../main/resources/scenario7/scenario7a.composite | 49 -- .../src/main/resources/scenario7/scenarios.wsdl | 63 -- .../scenario8/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario8/scenario8.composite | 44 - .../main/resources/scenario8/scenario8a.composite | 50 -- .../src/main/resources/scenario8/scenarios.wsdl | 63 -- .../scenario9/META-INF/sca-contribution.xml | 24 - .../main/resources/scenario9/scenario9.composite | 60 -- .../main/resources/scenario9/scenario9a.composite | 61 -- .../tuscany/sca/itest/builder/BuilderTestCase.java | 814 ------------------- .../sca/itest/builder/CustomCompositeBuilder.java | 99 --- .../tuscany/sca/itest/builder/TestUtils.java | 319 -------- .../sca-java-2.0-M4/itest/callback-api/pom.xml | 58 -- .../tuscany/sca/test/CallBackApiCallBack.java | 38 - .../apache/tuscany/sca/test/CallBackApiClient.java | 30 - .../tuscany/sca/test/CallBackApiClientImpl.java | 201 ----- .../tuscany/sca/test/CallBackApiService.java | 50 -- .../tuscany/sca/test/CallBackApiServiceImpl.java | 113 --- .../src/main/resources/CallBackApiTest.composite | 33 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../tuscany/sca/test/CallBackApiTestCase.java | 70 -- .../itest/callback-basic-ws/pom.xml | 78 -- .../tuscany/sca/test/CallBackBasicCallBack.java | 33 - .../tuscany/sca/test/CallBackBasicClient.java | 28 - .../tuscany/sca/test/CallBackBasicClientImpl.java | 129 --- .../tuscany/sca/test/CallBackBasicService.java | 37 - .../tuscany/sca/test/CallBackBasicServiceImpl.java | 56 -- .../src/main/resources/CallBackBasicTest.composite | 40 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../tuscany/sca/test/CallBackBasicTestCase.java | 56 -- .../sca-java-2.0-M4/itest/callback-basic/pom.xml | 58 -- .../tuscany/sca/test/CallBackBasicCallBack.java | 33 - .../tuscany/sca/test/CallBackBasicClient.java | 28 - .../tuscany/sca/test/CallBackBasicClientImpl.java | 129 --- .../tuscany/sca/test/CallBackBasicService.java | 37 - .../tuscany/sca/test/CallBackBasicServiceImpl.java | 56 -- .../src/main/resources/CallBackBasicTest.composite | 33 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../tuscany/sca/test/CallBackBasicTestCase.java | 56 -- .../itest/callback-complex-type/pom.xml | 53 -- .../tuscany/sca/test/CallBackCTypeCallBack.java | 33 - .../tuscany/sca/test/CallBackCTypeClient.java | 28 - .../tuscany/sca/test/CallBackCTypeClientImpl.java | 138 ---- .../tuscany/sca/test/CallBackCTypeService.java | 37 - .../tuscany/sca/test/CallBackCTypeServiceImpl.java | 59 -- .../main/resources/CallBackCTypeClient.composite | 33 - .../test/CallBackCTypeServiceImpl.componentType | 28 - .../tuscany/sca/test/CallBackCTypeTestCase.java | 54 -- .../itest/callback-multiple-wires/pom.xml | 53 -- .../apache/tuscany/sca/test/callback/MyClient.java | 27 - .../tuscany/sca/test/callback/MyClientImpl1.java | 49 -- .../tuscany/sca/test/callback/MyClientImpl2.java | 49 -- .../tuscany/sca/test/callback/MyService.java | 32 - .../sca/test/callback/MyServiceCallback.java | 27 - .../tuscany/sca/test/callback/MyServiceImpl.java | 45 - .../main/resources/CallbackMultiWireTest.composite | 38 - .../test/callback/CallbackMultiWireTestCase.java | 64 -- .../itest/callback-separatethread/pom.xml | 53 -- .../sca/itest/CallBackSeparateThreadClient.java | 34 - .../itest/CallBackSeparateThreadClientImpl.java | 186 ----- .../tuscany/sca/itest/EventProcessorCallBack.java | 37 - .../tuscany/sca/itest/EventProcessorService.java | 45 - .../sca/itest/EventProcessorServiceImpl.java | 195 ----- .../resources/CallBackSeparateThreadTest.composite | 31 - .../sca/itest/CallBackSeparateThreadTestCase.java | 73 -- .../sca-java-2.0-M4/itest/component-type/pom.xml | 53 -- .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 30 - .../src/main/java/calculator/CalculatorClient.java | 49 -- .../main/java/calculator/CalculatorService.java | 34 - .../java/calculator/CalculatorServiceImpl.java | 63 -- .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 30 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 30 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 30 - .../src/main/resources/Calculator.composite | 49 -- .../calculator/AddServiceImpl.componentType | 27 - .../calculator/CalculatorServiceImpl.componentType | 43 - .../calculator/DivideServiceImpl.componentType | 27 - .../calculator/MultiplyServiceImpl.componentType | 27 - .../calculator/SubtractServiceImpl.componentType | 27 - .../test/java/calculator/CalculatorTestCase.java | 60 -- .../itest/contribution-folder/pom.xml | 46 -- .../test/java/calculator/CalculatorService.java | 31 - .../test/java/test/ContributionFolderTestCase.java | 55 -- .../repository/folderWithJars/Calculator.composite | 49 -- .../folderWithJars/META-INF/sca-contribution.xml | 23 - .../repository/folderWithJars/service.jar | Bin 2380 -> 0 bytes .../repository/folderWithJars/serviceImpl.jar | Bin 4655 -> 0 bytes .../test/resources/repository3/contribution.zip | Bin 5478 -> 0 bytes .../export-composite/pom.xml | 67 -- .../src/main/java/hello/Hello.java | 30 - .../src/main/java/hello/HelloImpl.java | 33 - .../main/resources/META-INF/sca-contribution.xml | 25 - .../src/main/resources/hello.composite | 31 - .../sca/test/contribution/HelloTestCase.java | 91 --- .../contribution-import-export/export-java/pom.xml | 67 -- .../main/java/helloworld/HelloWorldService.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../helloworld/HelloWorldImpl.componentType | 30 - .../export-resource/pom.xml | 31 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/ufservices/store.html | 27 - .../contribution-import-export/export-wsdl/pom.xml | 31 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../export-wsdl/src/main/resources/helloworld.wsdl | 76 -- .../export-wsdl/src/main/resources/helloworld.xsd | 35 - .../import-composite/pom.xml | 73 -- .../src/main/java/helloworld/HelloWorldImpl.java | 38 - .../src/main/java/helloworld/HelloWorldServer.java | 46 -- .../main/java/helloworld/HelloWorldService.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 27 - .../src/main/resources/helloworld.wsdl | 76 -- .../src/main/resources/helloworld.xsd | 35 - .../src/main/resources/helloworldws.composite | 39 - .../contribution/HelloWorldServerTestCase.java | 126 --- .../contribution-import-export/import-java/pom.xml | 73 -- .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../main/resources/META-INF/sca-contribution.xml | 25 - .../src/main/resources/helloworldws.composite | 29 - .../contribution/HelloWorldServerTestCase.java | 127 --- .../import-resource/pom.xml | 102 --- .../main/resources/META-INF/sca-contribution.xml | 25 - .../src/main/resources/store.composite | 33 - .../sca/test/contribution/StoreTestCase.java | 129 --- .../contribution-import-export/import-wsdl/pom.xml | 73 -- .../src/main/java/helloworld/HelloWorldImpl.java | 33 - .../src/main/java/helloworld/HelloWorldServer.java | 46 -- .../main/java/helloworld/HelloWorldService.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 25 - .../src/main/resources/helloworldws.composite | 33 - .../contribution/HelloWorldServerTestCase.java | 137 ---- .../itest/contribution-import-export/pom.xml | 56 -- .../sca-java-2.0-M4/itest/contribution-zip/pom.xml | 45 - .../test/java/calculator/CalculatorService.java | 31 - .../contribution/zip/ContributionZIPTestCase.java | 56 -- .../src/test/resources/repository/contribution.zip | Bin 6395 -> 0 bytes .../itest/distribution/bin-distro-unzip/build.xml | 24 - .../itest/distribution/bin-distro-unzip/pom.xml | 138 ---- .../distribution/binding-ws-calculator/build.xml | 40 - .../distribution/binding-ws-calculator/pom.xml | 82 -- .../itest/distribution/calculator-rmi/build.xml | 51 -- .../itest/distribution/calculator-rmi/pom.xml | 81 -- .../implementation-java-calculator/build.xml | 40 - .../implementation-java-calculator/pom.xml | 82 -- .../itest/distribution/legal-checks/pom.xml | 42 - .../src/test/java/itest/JarsInLICENSETestCase.java | 162 ---- .../sca-java-2.0-M4/itest/distribution/pom.xml | 49 -- .../distribution/webapp-helloworld-bpel/pom.xml | 124 --- .../src/test/java/itest/HelloworldTestCase.java | 50 -- .../distribution/webapp-helloworld-jms/pom.xml | 216 ----- .../src/test/java/itest/HelloworldTestCase.java | 51 -- .../webapp-helloworld-js-client/pom.xml | 188 ----- .../src/test/java/itest/HelloworldTestCase.java | 75 -- .../distribution/webapp-helloworld-jsf/pom.xml | 130 --- .../test/java/itest/HelloworldTestCaseFIXME.java | 71 -- .../distribution/webapp-helloworld-jsp/pom.xml | 188 ----- .../src/test/java/itest/HelloworldTestCase.java | 50 -- .../distribution/webapp-helloworld-stripes/pom.xml | 124 --- .../src/test/java/itest/HelloworldTestCase.java | 53 -- .../itest/distribution/webapp-helloworld/pom.xml | 121 --- branches/sca-java-2.0-M4/itest/endpoints/pom.xml | 68 -- .../src/test/java/helloworld/HelloWorldImpl.java | 28 - .../test/java/helloworld/HelloWorldService.java | 28 - .../src/test/java/test/EndpointsTestCase.java | 110 --- .../test/java/test/NestedEndpointsTestCase.java | 110 --- .../itest/endpoints/src/test/java/test/Utils.java | 70 -- .../src/test/resources/helloworld.composite | 116 --- .../endpoints/src/test/resources/nested.composite | 30 - branches/sca-java-2.0-M4/itest/exceptions/pom.xml | 53 -- .../tuscany/sca/test/exceptions/Checked.java | 57 -- .../sca/test/exceptions/ExceptionHandler.java | 32 - .../test/exceptions/ExceptionRemoteThrower.java | 30 - .../sca/test/exceptions/ExceptionThrower.java | 37 - .../tuscany/sca/test/exceptions/UnChecked.java | 57 -- .../test/exceptions/impl/ExceptionHandlerImpl.java | 115 --- .../impl/ExceptionRemoteThrowerImpl.java | 44 - .../test/exceptions/impl/ExceptionThrowerImpl.java | 45 - .../impl/RemoteExceptionHandlerImpl.java | 116 --- .../src/main/resources/ExceptionTest.composite | 41 - .../sca/test/exceptions/ExceptionsTestCase.java | 85 -- .../itest/implementation-spring/pom.xml | 80 -- .../java/bigbank/stockquote/StockQuoteImpl.java | 38 - .../java/bigbank/stockquote/StockQuoteService.java | 30 - .../src/main/java/calculator/AddService.java | 28 - .../src/main/java/calculator/AddServiceImpl.java | 35 - .../main/java/calculator/CalculatorService.java | 37 - .../java/calculator/CalculatorServiceImpl.java | 79 -- .../src/main/java/calculator/DivideService.java | 28 - .../main/java/calculator/DivideServiceImpl.java | 35 - .../src/main/java/calculator/MultiplyService.java | 28 - .../main/java/calculator/MultiplyServiceImpl.java | 35 - .../src/main/java/calculator/SubtractService.java | 28 - .../main/java/calculator/SubtractServiceImpl.java | 35 - .../security/CalculatorCallbackHandler.java | 50 -- .../java/calculator/security/JaasLoginModule.java | 178 ---- .../java/calculator/security/UserPrincipal.java | 66 -- .../access/SCAApplicationContextProvider.java | 37 - .../src/main/java/helloworld/HelloWorld.java | 35 - .../src/main/java/helloworld/HelloWorldImpl.java | 38 - .../src/main/java/helloworld/HelloWorldProxy.java | 42 - .../src/main/java/mock/TestBean.java | 31 - .../src/main/java/mock/TestBeanImpl.java | 42 - .../src/main/java/mock/TestHelloWorldBean.java | 39 - .../src/main/java/mock/TestReference.java | 27 - .../src/main/java/mock/TestReferenceBean.java | 57 -- .../src/main/java/mock/TestSCAPropertyBean.java | 55 -- .../spring/annotations/CalculatorServiceImpl.java | 131 --- .../context/access/CalculatorService-context.xml | 45 - .../context/access/ContextAccess.composite | 49 -- .../context/imports/ContextImports.composite | 49 -- .../META-INF/spring/CalculatorService-context.xml | 39 - .../META-INF/spring/SpringImport-context.xml | 29 - .../context/multiple/MultipleContext.composite | 30 - .../multiple/springapp/META-INF/MANIFEST.MF | 3 - .../META-INF/spring/SpringHelloWorld-context.xml | 31 - .../META-INF/spring/StockQuoteService-context.xml | 36 - .../springapp/META-INF/spring/beanRefContext.xml | 34 - .../implementation/policies/CalculatorJass.config | 3 - .../policies/CalculatorLogMessages.properties | 18 - .../policies/ImplementationPolicies.composite | 58 -- .../META-INF/spring/CalculatorService-context.xml | 39 - .../implementation/policies/definitions.xml | 40 - .../location/folder/SpringFolderLocation.composite | 40 - .../location/folder/springapp/META-INF/MANIFEST.MF | 3 - .../META-INF/spring/SpringSCAProperty-context.xml | 34 - .../location/jar/SpringJarLocation.composite | 40 - .../main/resources/location/jar/spring-context.jar | Bin 1454 -> 0 bytes .../spring/SpringDelegationHelloWorld-context.xml | 39 - .../META-INF/spring/SpringHelloWorld-context.xml | 31 - .../spring/SpringDelegationHelloWorld.composite | 33 - .../sca/itest/spring/SpringHelloWorld.composite | 33 - .../spring/SpringExplicitReference-context.xml | 33 - .../spring/SpringImplicitReference-context.xml | 34 - .../references/SpringExplicitReference.composite | 33 - .../references/SpringImplicitReference.composite | 40 - .../spring/SpringExplicitService-context.xml | 39 - .../spring/SpringImplicitService-context.xml | 31 - .../sca/services/SpringExplicitService.composite | 34 - .../sca/services/SpringImplicitService.composite | 33 - .../spring/annotations/Calculator.composite | 60 -- .../annotations/CalculatorService-context.xml | 41 - .../test/java/context/access/CalculatorClient.java | 60 -- .../java/context/access/ContextAccessTestCase.java | 32 - .../java/context/imports/CalculatorClient.java | 53 -- .../context/imports/ContextImportsTestCase.java | 32 - .../context/multiple/MultipleContextTestCase.java | 32 - .../java/context/multiple/StockQuoteServer.java | 54 -- .../implementation/policies/CalculatorClient.java | 76 -- .../policies/ImplementationPoliciesTestCase.java | 32 - .../folder/SpringFolderLocationTestCase.java | 45 - .../location/jar/SpringJarLocationTestCase.java | 45 - .../itest/spring/AbstractHelloWorldTestCase.java | 44 - .../sca/itest/spring/AbstractSCATestCase.java | 60 -- .../tuscany/sca/itest/spring/HelloWorld.java | 34 - .../tuscany/sca/itest/spring/HelloWorldProxy.java | 41 - .../spring/SpringDelegationHelloWorldTestCase.java | 35 - .../sca/itest/spring/SpringHelloWorldTestCase.java | 36 - .../sca/itest/spring/TestHelloWorldBean.java | 36 - .../itest/spring/TestHelloWorldDelegatorBean.java | 40 - .../SpringExplicitReferenceTestCase.java | 45 - .../SpringImplicitReferenceTestCase.java | 48 -- .../services/SpringExplicitServiceTestCase.java | 40 - .../services/SpringImplicitServiceTestCase.java | 38 - .../java/spring/annotations/CalculatorClient.java | 55 -- .../annotations/SpringAnnotationsTestCase.java | 32 - branches/sca-java-2.0-M4/itest/interfaces/pom.xml | 53 -- .../itest/interfaces/LocalCallbackInterface.java | 30 - .../sca/itest/interfaces/LocalClientComponent.java | 47 -- .../itest/interfaces/LocalClientComponentImpl.java | 83 -- .../itest/interfaces/LocalServiceComponent.java | 37 - .../interfaces/LocalServiceComponentImpl.java | 49 -- .../sca/itest/interfaces/ParameterObject.java | 48 -- .../itest/interfaces/RemoteCallbackInterface.java | 33 - .../itest/interfaces/RemoteClientComponent.java | 64 -- .../interfaces/RemoteClientComponentImpl.java | 81 -- .../itest/interfaces/RemoteServiceComponent.java | 38 - .../interfaces/RemoteServiceComponentImpl.java | 54 -- .../src/main/resources/InterfacesTest.composite | 40 - .../resources/InvalidRemoteAttribute.composite | 28 - .../sca/itest/interfaces/InterfacesTestCase.java | 133 --- .../interfaces/InvalidRemoteAttributeTestCase.java | 49 -- .../itest/jaxws-asyncclient/pom.xml | 53 -- .../src/main/java/stock/StockQuote.java | 36 - .../src/main/java/stock/StockQuoteClient.java | 69 -- .../src/main/java/stock/StockQuoteImpl.java | 34 - .../src/main/java/stock/StockQuoteRef.java | 39 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../src/main/resources/StockQuote.composite | 33 - .../src/test/java/itest/AsyncServiceTestCase.java | 67 -- branches/sca-java-2.0-M4/itest/jaxws/pom.xml | 53 -- .../src/test/java/stock/AsyncServiceTestCase.java | 42 - .../jaxws/src/test/java/stock/StockQuote.java | 45 - .../jaxws/src/test/java/stock/StockQuoteImpl.java | 46 -- .../jaxws/src/test/resources/StockQuote.composite | 31 - .../itest/jms/DynamicReplyQ/pom.xml | 83 -- .../sca/binding/jms/HelloWorldClientImpl.java | 41 - .../tuscany/sca/binding/jms/HelloWorldService.java | 26 - .../sca/binding/jms/HelloWorldServiceImpl.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/dynamic/client.composite | 34 - .../src/main/resources/jndi.properties | 39 - .../src/main/resources/simple/service.composite | 37 - .../sca/binding/jms/DynamicReplyQTestCase.java | 53 -- branches/sca-java-2.0-M4/itest/jms/args/pom.xml | 70 -- .../apache/tuscany/sca/binding/jms/ClientImpl.java | 41 - .../apache/tuscany/sca/binding/jms/MyService.java | 29 - .../tuscany/sca/binding/jms/ServiceImpl.java | 38 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../jms/args/src/main/resources/jndi.properties | 38 - .../main/resources/selectors/selectors.composite | 38 - .../tuscany/sca/binding/jms/ArgsTestCase.java | 62 -- .../sca-java-2.0-M4/itest/jms/callbacks/pom.xml | 73 -- .../apache/tuscany/sca/binding/jms/JMSClient.java | 28 - .../tuscany/sca/binding/jms/JMSClientImpl.java | 50 -- .../apache/tuscany/sca/binding/jms/JMSService.java | 34 - .../sca/binding/jms/JMSServiceCallback.java | 32 - .../tuscany/sca/binding/jms/JMSServiceImpl.java | 47 -- .../main/resources/META-INF/sca-contribution.xml | 24 - .../callbacks/src/main/resources/jndi.properties | 40 - .../src/main/resources/simple/client.composite | 44 - .../src/main/resources/simple/tempq.composite | 50 -- .../tuscany/sca/binding/jms/CallbackTestCase.java | 61 -- .../sca/binding/jms/TempCallbackQTestCase.java | 64 -- .../sca-java-2.0-M4/itest/jms/defaults/pom.xml | 83 -- .../sca/binding/jms/HelloWorldClientImpl.java | 41 - .../tuscany/sca/binding/jms/HelloWorldService.java | 26 - .../sca/binding/jms/HelloWorldServiceImpl.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/defaults/client.composite | 31 - .../src/main/resources/defaults/service.composite | 31 - .../defaults/src/main/resources/jndi.properties | 39 - .../tuscany/sca/binding/jms/DefaultsTestCase.java | 54 -- .../sca-java-2.0-M4/itest/jms/definitions/pom.xml | 73 -- .../tuscany/sca/binding/jms/OneWayClientImpl.java | 41 - .../tuscany/sca/binding/jms/OneWayService.java | 29 - .../tuscany/sca/binding/jms/OneWayServiceImpl.java | 34 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../definitions/src/main/resources/definitions.xml | 28 - .../resources/definitions/definitions.composite | 39 - .../definitions/src/main/resources/jndi.properties | 38 - .../sca/binding/jms/DefinitionsTestCase.java | 62 -- .../sca-java-2.0-M4/itest/jms/exceptions/pom.xml | 90 -- .../tuscany/sca/binding/jms/CheckedExcpetion.java | 28 - .../sca/binding/jms/CheckedExcpetion2Args.java | 28 - .../sca/binding/jms/CheckedExcpetionChained.java | 28 - .../sca/binding/jms/CheckedExcpetionNoArgs.java | 28 - .../tuscany/sca/binding/jms/ExceptionService.java | 33 - .../sca/binding/jms/ExceptionServiceImpl.java | 44 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/exceptions/service.composite | 44 - .../exceptions/src/main/resources/jndi.properties | 40 - .../sca/binding/jms/ExceptionsTestCase.java | 212 ----- .../sca-java-2.0-M4/itest/jms/exceptions1/pom.xml | 83 -- .../tuscany/sca/binding/jms/CheckedExcpetion.java | 28 - .../sca/binding/jms/CheckedExcpetion2Args.java | 28 - .../sca/binding/jms/CheckedExcpetionChained.java | 28 - .../sca/binding/jms/CheckedExcpetionNoArgs.java | 28 - .../tuscany/sca/binding/jms/ExceptionService.java | 33 - .../sca/binding/jms/ExceptionServiceClient.java | 57 -- .../sca/binding/jms/ExceptionServiceImpl.java | 44 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/exceptions/client.composite | 31 - .../main/resources/exceptions/service.composite | 31 - .../exceptions1/src/main/resources/jndi.properties | 39 - .../sca/binding/jms/ExceptionsTestCase.java | 110 --- .../itest/jms/externalBroker/pom.xml | 83 -- .../sca/binding/jms/HelloWorldClientImpl.java | 41 - .../tuscany/sca/binding/jms/HelloWorldService.java | 26 - .../sca/binding/jms/HelloWorldServiceImpl.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/external/client.composite | 36 - .../src/main/resources/external/service.composite | 36 - .../src/main/resources/jndi.properties | 39 - .../sca/binding/jms/ExternalBrokerTestCase.java | 71 -- .../itest/jms/format-jmsbytes/pom.xml | 83 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/jmsbytes/helloworld.composite | 45 - .../src/main/resources/jndi.properties | 39 - .../binding/jms/format/FormatJMSBytesTestCase.java | 69 -- .../itest/jms/format-jmsbytesxml/pom.xml | 83 -- .../jmsbytesxml/helloworld/CheckedException.java | 28 - .../helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 46 -- .../jmsbytesxml/helloworld/HelloWorldService.java | 34 - .../helloworld/HelloWorldServiceImpl.java | 39 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../resources/jmsbytesxml/helloworld.composite | 45 - .../src/main/resources/jndi.properties | 39 - .../jms/format/FormatJMSBytesXMLTestCase.java | 58 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../itest/jms/format-jmsdefault/pom.xml | 83 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../jmsdefault/helloworld/CheckedException.java | 28 - .../jmsdefault/helloworld/HelloWorldReference.java | 36 - .../helloworld/HelloWorldReferenceImpl.java | 85 -- .../jmsdefault/helloworld/HelloWorldService.java | 38 - .../helloworld/HelloWorldServiceImpl.java | 51 -- .../jms/format/jmsdefault/helloworld/Person.java | 42 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/jmsdefault/helloworld.composite | 94 --- .../src/main/resources/jmsdefault/helloworld.wsdl | 139 ---- .../src/main/resources/jndi.properties | 39 - .../jms/format/FormatJMSDefaultTestCase.java | 68 -- .../itest/jms/format-jmsmessage/pom.xml | 83 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../jmsmessage/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 41 - .../jmsmessage/helloworld/HelloWorldService.java | 34 - .../helloworld/HelloWorldServiceImpl.java | 51 -- .../helloworld/HelloWorldServiceReferenceSide.java | 37 - .../jms/format/jmsmessage/helloworld/README | 3 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/jmsmessage/helloworld.composite | 46 -- .../src/main/resources/jmsmessage/helloworld.wsdl | 129 --- .../src/main/resources/jndi.properties | 39 - .../jms/format/FormatJMSMessageTestCase.java | 58 -- .../itest/jms/format-jmsobject/pom.xml | 83 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../jmsobject/helloworld/CheckedException.java | 28 - .../jmsobject/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 112 --- .../jmsobject/helloworld/HelloWorldService.java | 41 - .../helloworld/HelloWorldServiceImpl.java | 63 -- .../jms/format/jmsobject/helloworld/Person.java | 47 -- .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/jmsobject/helloworld.composite | 62 -- .../src/main/resources/jmsobject/helloworld.wsdl | 368 --------- .../src/main/resources/jndi.properties | 39 - .../jms/format/FormatJMSObjectTestCase.java | 73 -- .../itest/jms/format-jmstext/pom.xml | 83 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../jmstext/helloworld/CheckedException.java | 28 - .../jmstext/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 46 -- .../jmstext/helloworld/HelloWorldService.java | 35 - .../jmstext/helloworld/HelloWorldServiceImpl.java | 38 - .../helloworld/HelloWorldServiceReference.java | 35 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/jmstext/helloworld.composite | 45 - .../src/main/resources/jndi.properties | 39 - .../binding/jms/format/FormatJMSTextTestCase.java | 60 -- .../itest/jms/format-jmstextxml/pom.xml | 83 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../jmstextxml/helloworld/CheckedException.java | 28 - .../jmstextxml/helloworld/HelloWorldReference.java | 33 - .../helloworld/HelloWorldReferenceImpl.java | 62 -- .../jmstextxml/helloworld/HelloWorldService.java | 35 - .../helloworld/HelloWorldServiceImpl.java | 44 - .../jms/format/jmstextxml/helloworld/Person.java | 42 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/jmstextxml/helloworld.composite | 80 -- .../src/main/resources/jmstextxml/helloworld.wsdl | 153 ---- .../src/main/resources/jndi.properties | 39 - .../jms/format/FormatJMSTextXMLTestCase.java | 62 -- .../jms/format-jmstextxmlinjmsobjectout/pom.xml | 83 -- .../jmsbytes/helloworld/CheckedException.java | 28 - .../jmsbytes/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 50 -- .../jmsbytes/helloworld/HelloWorldService.java | 35 - .../jmsbytes/helloworld/HelloWorldServiceImpl.java | 40 - .../helloworld/HelloWorldServiceReference.java | 35 - .../jmsbytesxml/helloworld/CheckedException.java | 28 - .../helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 46 -- .../jmsbytesxml/helloworld/HelloWorldService.java | 34 - .../helloworld/HelloWorldServiceImpl.java | 39 - .../jmsdefault/helloworld/CheckedException.java | 28 - .../jmsdefault/helloworld/HelloWorldReference.java | 36 - .../helloworld/HelloWorldReferenceImpl.java | 85 -- .../jmsdefault/helloworld/HelloWorldService.java | 38 - .../helloworld/HelloWorldServiceImpl.java | 51 -- .../jms/format/jmsdefault/helloworld/Person.java | 42 - .../jmsmessage/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 41 - .../jmsmessage/helloworld/HelloWorldService.java | 34 - .../helloworld/HelloWorldServiceImpl.java | 51 -- .../helloworld/HelloWorldServiceReferenceSide.java | 37 - .../jms/format/jmsmessage/helloworld/README | 3 - .../jmsobject/helloworld/CheckedException.java | 28 - .../jmsobject/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 112 --- .../jmsobject/helloworld/HelloWorldService.java | 41 - .../helloworld/HelloWorldServiceImpl.java | 63 -- .../jms/format/jmsobject/helloworld/Person.java | 47 -- .../jmstext/helloworld/CheckedException.java | 28 - .../jmstext/helloworld/HelloWorldReference.java | 32 - .../helloworld/HelloWorldReferenceImpl.java | 46 -- .../jmstext/helloworld/HelloWorldService.java | 35 - .../jmstext/helloworld/HelloWorldServiceImpl.java | 38 - .../helloworld/HelloWorldServiceReference.java | 35 - .../jmstextxml/helloworld/CheckedException.java | 28 - .../jmstextxml/helloworld/HelloWorldReference.java | 33 - .../helloworld/HelloWorldReferenceImpl.java | 62 -- .../jmstextxml/helloworld/HelloWorldService.java | 35 - .../helloworld/HelloWorldServiceImpl.java | 44 - .../jms/format/jmstextxml/helloworld/Person.java | 42 - .../helloworld/HelloWorldReferenceImpl.java | 38 - .../helloworld/HelloWorldService.java | 33 - .../helloworld/HelloWorldServiceImpl.java | 35 - .../helloworld/Person.java | 42 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../jmstextxmlinjmsobjectout/helloworld.composite | 52 -- .../jmstextxmlinjmsobjectout/helloworld.wsdl | 139 ---- .../src/main/resources/jndi.properties | 39 - .../FormatJMSTextXMLInJMSObjectOutTestCase.java | 62 -- .../itest/jms/non-sca-client/pom.xml | 83 -- .../sca/binding/jms/OneWayObjectService.java | 29 - .../sca/binding/jms/OneWayObjectServiceImpl.java | 34 - .../tuscany/sca/binding/jms/OneWayService.java | 29 - .../tuscany/sca/binding/jms/OneWayServiceImpl.java | 34 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../src/main/resources/jndi.properties | 39 - .../main/resources/nonSCAclient/service.composite | 54 -- .../sca/binding/jms/NonSCAClientTestCase.java | 144 ---- .../sca-java-2.0-M4/itest/jms/noreplyto/pom.xml | 83 -- .../tuscany/sca/binding/jms/HelloWorldService.java | 26 - .../sca/binding/jms/HelloWorldServiceImpl.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../noreplyto/src/main/resources/jndi.properties | 39 - .../noreplyto/src/main/resources/service.composite | 38 - .../tuscany/sca/binding/jms/NoReplyToTestCase.java | 100 --- branches/sca-java-2.0-M4/itest/jms/nulls/pom.xml | 71 -- .../apache/tuscany/sca/binding/jms/ClientImpl.java | 41 - .../apache/tuscany/sca/binding/jms/MyService.java | 28 - .../tuscany/sca/binding/jms/ServiceImpl.java | 28 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../jms/nulls/src/main/resources/jndi.properties | 38 - .../jms/nulls/src/main/resources/nulls.composite | 57 -- .../tuscany/sca/binding/jms/NullsTestCase.java | 60 -- .../sca-java-2.0-M4/itest/jms/oneway-nocf/pom.xml | 83 -- .../tuscany/sca/binding/jms/OneWayClientImpl.java | 41 - .../tuscany/sca/binding/jms/OneWayService.java | 29 - .../tuscany/sca/binding/jms/OneWayServiceImpl.java | 34 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../oneway-nocf/src/main/resources/jndi.properties | 38 - .../main/resources/oneway/OneWayClient.composite | 35 - .../main/resources/oneway/OneWayService.composite | 34 - .../tuscany/sca/binding/jms/OneWayTestCase.java | 59 -- branches/sca-java-2.0-M4/itest/jms/oneway/pom.xml | 83 -- .../tuscany/sca/binding/jms/OneWayClientImpl.java | 41 - .../sca/binding/jms/OneWayObjectService.java | 29 - .../sca/binding/jms/OneWayObjectServiceImpl.java | 34 - .../tuscany/sca/binding/jms/OneWayService.java | 29 - .../tuscany/sca/binding/jms/OneWayServiceImpl.java | 34 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../jms/oneway/src/main/resources/jndi.properties | 39 - .../main/resources/oneway/OneWayClient.composite | 33 - .../main/resources/oneway/OneWayService.composite | 33 - .../tuscany/sca/binding/jms/OneWayTestCase.java | 60 -- .../itest/jms/policy-headers/pom.xml | 83 -- .../apache/tuscany/sca/binding/jms/JMSClient.java | 28 - .../apache/tuscany/sca/binding/jms/MsgClient.java | 29 - .../tuscany/sca/binding/jms/MsgClientImpl.java | 38 - .../tuscany/sca/binding/jms/MsgClientService.java | 33 - .../apache/tuscany/sca/binding/jms/MsgService.java | 32 - .../tuscany/sca/binding/jms/MsgServiceImpl.java | 39 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../src/main/resources/jndi.properties | 39 - .../main/resources/policyHeaders/definitions.xml | 54 -- .../policyHeaders/policyHeaders.composite | 45 - .../sca/binding/jms/PolicyHeadersTestCase.java | 94 --- branches/sca-java-2.0-M4/itest/jms/pom.xml | 68 -- .../sca-java-2.0-M4/itest/jms/properties/pom.xml | 83 -- .../apache/tuscany/sca/binding/jms/JMSClient.java | 28 - .../apache/tuscany/sca/binding/jms/MsgClient.java | 29 - .../tuscany/sca/binding/jms/MsgClientImpl.java | 38 - .../tuscany/sca/binding/jms/MsgClientService.java | 33 - .../apache/tuscany/sca/binding/jms/MsgService.java | 32 - .../tuscany/sca/binding/jms/MsgServiceImpl.java | 39 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../properties/src/main/resources/jndi.properties | 39 - .../main/resources/properties/properties.composite | 53 -- .../sca/binding/jms/PropertiesTestCase.java | 93 --- .../sca-java-2.0-M4/itest/jms/responsecf/pom.xml | 83 -- .../sca/binding/jms/HelloWorldClientImpl.java | 41 - .../tuscany/sca/binding/jms/HelloWorldService.java | 26 - .../sca/binding/jms/HelloWorldServiceImpl.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../src/main/resources/cf/client.composite | 36 - .../src/main/resources/cf/service.composite | 36 - .../responsecf/src/main/resources/jndi.properties | 39 - .../sca/binding/jms/ResponseCFTestCase.java | 53 -- branches/sca-java-2.0-M4/itest/jms/rpc/pom.xml | 83 -- .../sca/binding/jms/HelloWorldClientImpl.java | 41 - .../tuscany/sca/binding/jms/HelloWorldService.java | 26 - .../sca/binding/jms/HelloWorldServiceImpl.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../jms/rpc/src/main/resources/jndi.properties | 39 - .../rpc/src/main/resources/simple/client.composite | 37 - .../src/main/resources/simple/service.composite | 37 - .../tuscany/sca/binding/jms/RPCTestCase.java | 53 -- .../sca-java-2.0-M4/itest/jms/selectors/pom.xml | 70 -- .../apache/tuscany/sca/binding/jms/ClientImpl.java | 41 - .../tuscany/sca/binding/jms/SelectorService.java | 29 - .../sca/binding/jms/SelectorServiceImpl1.java | 40 - .../sca/binding/jms/SelectorServiceImpl2.java | 38 - .../sca/binding/jms/SelectorServiceImpl3.java | 38 - .../jmsdefault/HelloWorldReference.java | 32 - .../jmsdefault/HelloWorldReferenceImpl.java | 39 - .../jmsdefault/HelloWorldService.java | 38 - .../jmsdefault/HelloWorldServiceImpl.java | 47 -- .../jmsuserprop/HelloWorldReference.java | 32 - .../jmsuserprop/HelloWorldReferenceImpl.java | 36 - .../jmsuserprop/HelloWorldService.java | 38 - .../jmsuserprop/HelloWorldServiceImpl.java | 47 -- .../main/resources/META-INF/sca-contribution.xml | 25 - .../main/resources/jmsdefault/helloworld.composite | 69 -- .../resources/jmsuserprop/helloworld.composite | 65 -- .../selectors/src/main/resources/jndi.properties | 38 - .../main/resources/selectors/selectors.composite | 68 -- .../jms/OperationselectorJMSDefaultTestCase.java | 57 -- .../jms/OperationselectorJMSUserPropTestCase.java | 57 -- .../tuscany/sca/binding/jms/SelectorsTestCase.java | 76 -- branches/sca-java-2.0-M4/itest/jms/topics/pom.xml | 71 -- .../tuscany/sca/binding/jms/OneWayClientImpl.java | 41 - .../tuscany/sca/binding/jms/OneWayService.java | 29 - .../tuscany/sca/binding/jms/OneWayServiceImpl.java | 34 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../jms/topics/src/main/resources/jndi.properties | 38 - .../main/resources/topics/TopicsClient.composite | 33 - .../main/resources/topics/TopicsService.composite | 33 - .../tuscany/sca/binding/jms/TopicsTestCase.java | 59 -- branches/sca-java-2.0-M4/itest/jms/ttl/pom.xml | 71 -- .../main/java/itest/MockInitialContextFactory.java | 904 --------------------- .../tuscany/sca/binding/jms/ClientIface.java | 30 - .../apache/tuscany/sca/binding/jms/ClientImpl.java | 39 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../jms/ttl/src/main/resources/jndi.properties | 38 - .../itest/jms/ttl/src/main/resources/ttl.composite | 35 - .../tuscany/sca/binding/jms/TTLTestCase.java | 64 -- branches/sca-java-2.0-M4/itest/jms/uri-rpc/pom.xml | 83 -- .../sca/binding/jms/HelloWorldClientImpl.java | 41 - .../tuscany/sca/binding/jms/HelloWorldService.java | 26 - .../sca/binding/jms/HelloWorldServiceImpl.java | 30 - .../main/resources/META-INF/sca-contribution.xml | 24 - .../jms/uri-rpc/src/main/resources/jndi.properties | 39 - .../src/main/resources/simple/service.composite | 37 - .../src/main/resources/simple/uriclient.composite | 31 - .../tuscany/sca/binding/jms/URIRPCTestCase.java | 54 -- .../itest/nodes/helloworld-client/pom.xml | 44 - .../src/main/java/itest/nodes/HelloworldImpl.java | 43 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../src/main/resources/helloworld-client.composite | 29 - .../itest/nodes/helloworld-iface/pom.xml | 39 - .../src/main/java/itest/nodes/Helloworld.java | 29 - .../itest/nodes/helloworld-service/pom.xml | 49 -- .../src/main/java/itest/nodes/HelloworldImpl.java | 28 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../main/resources/helloworld-service.composite | 28 - .../itest/nodes/one-node-test/pom.xml | 48 -- .../src/test/java/itest/OneNodeTestCase.java | 87 -- branches/sca-java-2.0-M4/itest/nodes/pom.xml | 45 - .../itest/nodes/two-nodes-test/pom.xml | 58 -- .../src/test/java/itest/ClientNode.java | 92 --- .../src/test/java/itest/ServiceNode.java | 58 -- .../test/java/itest/StopStartNodesTestCase.java | 102 --- .../src/test/java/itest/TestCaseRunner.java | 292 ------- .../src/test/java/itest/TwoNodesTestCase.java | 105 --- .../itest/nodes/two-nodes-two-vms-test/build.xml | 38 - .../nodes/two-nodes-two-vms-test/client-config.xml | 38 - .../itest/nodes/two-nodes-two-vms-test/client.xml | 33 - .../itest/nodes/two-nodes-two-vms-test/pom.xml | 117 --- .../nodes/two-nodes-two-vms-test/server-config.xml | 38 - .../itest/nodes/two-nodes-two-vms-test/server.xml | 33 - .../src/test/java/itest/TwoNodesTestCase.java | 57 -- .../itest/operation-overloading/pom.xml | 53 -- .../sca/test/opoverload/OverloadASourceTarget.java | 61 -- .../sca/test/opoverload/impl/OverloadASource.java | 113 --- .../sca/test/opoverload/impl/OverloadATarget.java | 99 --- .../src/main/resources/OperationOverload.composite | 34 - .../test/opoverload/impl/OverloadATestCase.java | 98 --- branches/sca-java-2.0-M4/itest/policies/pom.xml | 59 -- .../tuscany/sca/itest/policies/CreditCard.java | 65 -- .../sca/itest/policies/CreditCardPayment.java | 37 - .../tuscany/sca/itest/policies/Customer.java | 51 -- .../sca/itest/policies/CustomerRegistry.java | 27 - .../apache/tuscany/sca/itest/policies/Payment.java | 30 - .../itest/policies/impl/CreditCardPaymentImpl.java | 40 - .../itest/policies/impl/CustomerRegistryImpl.java | 78 -- .../sca/itest/policies/impl/PaymentImpl.java | 54 -- .../policies/src/main/resources/Customer.composite | 34 - .../src/main/resources/LoggingMessages.properties | 16 - .../src/main/resources/META-INF/definitions.xml | 46 -- .../main/resources/META-INF/sca-contribution.xml | 23 - .../policies/src/main/resources/Payment.composite | 49 -- .../sca/itest/policies/PaymentTestCase.java | 69 -- branches/sca-java-2.0-M4/itest/pom.xml | 167 ---- branches/sca-java-2.0-M4/itest/properties/pom.xml | 74 -- .../java/mysca/test/myservice/impl/MyService.java | 34 - .../mysca/test/myservice/impl/MyServiceImpl.java | 88 -- .../test/myservice/impl/MyTotalServiceImpl.java | 46 -- .../apache/tuscany/sca/itest/ABCDComponent.java | 50 -- .../tuscany/sca/itest/ABCDComponentImpl.java | 73 -- .../org/apache/tuscany/sca/itest/ABComponent.java | 75 -- .../apache/tuscany/sca/itest/ABComponentImpl.java | 131 --- .../org/apache/tuscany/sca/itest/CDComponent.java | 71 -- .../apache/tuscany/sca/itest/CDComponentImpl.java | 143 ---- .../tuscany/sca/itest/ComplexPropertyBean.java | 151 ---- .../apache/tuscany/sca/itest/OverrideService.java | 27 - .../tuscany/sca/itest/OverrideServiceImpl.java | 28 - .../tuscany/sca/itest/PropertyComponent.java | 114 --- .../tuscany/sca/itest/PropertyComponentImpl.java | 144 ---- .../apache/tuscany/sca/itest/PropertyService.java | 27 - .../java/org/apache/tuscany/sca/itest/cdi/Bar.java | 23 - .../org/apache/tuscany/sca/itest/cdi/Foo1.java | 39 - .../org/apache/tuscany/sca/itest/cdi/Foo2.java | 39 - .../org/apache/tuscany/sca/itest/cdi/Foo3.java | 44 - .../main/java/test/jaxb/props/ObjectFactory.java | 75 -- .../java/test/jaxb/props/ReturnCodeProperties.java | 103 --- .../main/java/test/jaxb/props/package-info.java | 27 - .../ConstructorPropertyInjection.composite | 39 - .../properties/src/main/resources/Outer.composite | 43 - .../src/main/resources/OuterPropertyTest.composite | 42 - .../src/main/resources/PropertyTest.composite | 260 ------ .../properties/src/main/resources/customer.xsd | 30 - .../properties/src/main/resources/fileProperty.txt | 21 - .../src/main/resources/manyValuesFileProperty.txt | 23 - .../src/main/resources/mySimpleService.composite | 40 - .../properties/src/main/resources/rcProps.txt | 22 - .../properties/src/main/resources/rcprops.xsd | 55 -- .../tuscany/sca/itest/MyTotalServiceTestCase.java | 104 --- .../tuscany/sca/itest/OuterPropertyTestCase.java | 169 ---- .../apache/tuscany/sca/itest/PropertyTestCase.java | 422 ---------- .../cdi/ConstructorPropertyInjectionTestCase.java | 72 -- .../itest/recursive-multi-level/pom.xml | 61 -- .../main/java/mysca/test/myservice/MyService.java | 26 - .../java/mysca/test/myservice/MyServiceImpl.java | 42 - .../mysca/test/myservice/MySimpleTotalService.java | 26 - .../test/myservice/MySimpleTotalServiceImpl.java | 39 - .../src/main/resources/TotalService1Auto.composite | 52 -- .../src/main/resources/TotalService2Auto.composite | 49 -- .../src/main/resources/TotalService3Auto.composite | 52 -- .../java/test/sca/tests/MultiLevelTestCase.java | 90 -- branches/sca-java-2.0-M4/itest/references/pom.xml | 52 -- .../tuscany/sca/itest/references/AComponent.java | 40 - .../sca/itest/references/AComponentImpl.java | 125 --- .../tuscany/sca/itest/references/BComponent.java | 26 - .../sca/itest/references/BComponentImpl.java | 39 - .../references/BComponentWrongTargetImpl.java | 39 - .../tuscany/sca/itest/references/CComponent.java | 24 - .../sca/itest/references/CComponentImpl.java | 27 - .../tuscany/sca/itest/references/DComponent.java | 26 - .../sca/itest/references/DComponentImpl.java | 35 - .../resources/AutoWiredReferencesTest.composite | 61 -- .../main/resources/InnerReferencesTest.composite | 51 -- .../resources/ManualWiredReferencesTest.composite | 59 -- .../references/AutoWiredReferenceTestCase.java | 114 --- .../itest/references/InnerReferenceTestCase.java | 99 --- .../references/ManualWiredReferenceTestCase.java | 97 --- .../sca-java-2.0-M4/itest/scaclient-api/pom.xml | 46 -- .../src/main/java/itest/HelloworldService.java | 25 - .../src/main/java/itest/HelloworldServiceImpl.java | 38 - .../src/main/resources/Helloworld.composite | 29 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../java/test/scaclient/SCAClientTestCase.java | 61 -- branches/sca-java-2.0-M4/itest/scdl/pom.xml | 79 -- .../sca/itest/scdl/ContributionTestCase.java | 80 -- .../tuscany/sca/itest/scdl/SCDLTestCase.java | 87 -- .../itest/scdl/ValidateDependenciesTestCase.java | 73 -- .../itest/scdl/src/test/resources/test.composite | 51 -- branches/sca-java-2.0-M4/itest/scopes/pom.xml | 54 -- .../scopes/CompositeScopeStateVerifierImpl.java | 46 -- .../tuscany/sca/itest/scopes/StateVerifier.java | 25 - .../scopes/src/main/resources/scopes.composite | 29 - .../org/apache/tuscany/sca/test/ScopeTestCase.java | 89 -- .../itest/service-reference/pom.xml | 66 -- .../tuscany/sca/itest/serviceref/AComponent.java | 39 - .../sca/itest/serviceref/AComponentImpl.java | 112 --- .../tuscany/sca/itest/serviceref/BComponent.java | 31 - .../sca/itest/serviceref/BComponentImpl.java | 38 - .../tuscany/sca/itest/serviceref/Base64Binary.java | 297 ------- .../tuscany/sca/itest/serviceref/CComponent.java | 27 - .../sca/itest/serviceref/CComponentImpl.java | 30 - .../tuscany/sca/itest/serviceref/DComponent.java | 30 - .../sca/itest/serviceref/DComponentImpl.java | 64 -- .../src/main/resources/nodeA/CompositeA.composite | 44 - .../src/main/resources/nodeB/CompositeB.composite | 46 -- .../ServiceReferenceTest.composite | 48 -- .../CallableReferenceRemoteTestCase.java | 139 ---- .../itest/serviceref/ServiceReferenceTestCase.java | 88 -- branches/sca-java-2.0-M4/itest/services/pom.xml | 53 -- .../tuscany/sca/itest/services/AComponent.java | 27 - .../tuscany/sca/itest/services/AComponentImpl.java | 28 - .../tuscany/sca/itest/services/BComponent.java | 25 - .../tuscany/sca/itest/services/BComponentImpl.java | 31 - .../tuscany/sca/itest/services/CComponent.java | 27 - .../tuscany/sca/itest/services/CComponentImpl.java | 28 - .../tuscany/sca/itest/services/D1Component.java | 24 - .../tuscany/sca/itest/services/DComponent.java | 24 - .../tuscany/sca/itest/services/DComponentImpl.java | 34 - .../main/resources/META-INF/sca-contribution.xml | 23 - .../src/main/resources/ServicesTest.composite | 70 -- .../sca/itest/services/ServicesTestCase.java | 108 --- branches/sca-java-2.0-M4/itest/wires/pom.xml | 53 -- .../org/apache/tuscany/sca/itest/WireClient.java | 34 - .../apache/tuscany/sca/itest/WireClientImpl.java | 51 -- .../org/apache/tuscany/sca/itest/WireService.java | 36 - .../apache/tuscany/sca/itest/WireServiceImpl.java | 39 - .../wires/src/main/resources/WireTest.composite | 39 - .../org/apache/tuscany/sca/itest/WireTestCase.java | 78 -- 910 files changed, 48544 deletions(-) delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/log4j.properties delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/log4j.properties delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/log4j.properties delete mode 100644 branches/sca-java-2.0-M4/itest/bpel/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/service3.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/service3.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenarios.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenarios.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenarios.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenarios.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9a.composite delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java delete mode 100644 branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/CallBackApiTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/CallBackBasicTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType delete mode 100644 branches/sca-java-2.0-M4/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/resources/Calculator.composite delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType delete mode 100644 branches/sca-java-2.0-M4/itest/component-type/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository3/contribution.zip delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/hello.composite delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/store.composite delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-import-export/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-zip/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/contribution-zip/src/test/resources/repository/contribution.zip delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/build.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/build.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/build.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/build.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/legal-checks/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/EndpointsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/Utils.java delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/nested.composite delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/main/resources/ExceptionTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddService.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorService.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideService.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractService.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBean.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InterfacesTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InvalidRemoteAttribute.composite delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuote.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuoteImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jaxws/src/test/resources/StockQuote.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/selectors/selectors.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/tempq.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions/definitions.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/exceptions/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/noreplyto/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/nulls.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/definitions.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/properties/properties.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/selectors/selectors.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsClient.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsService.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/ttl.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/jndi.properties delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite delete mode 100644 branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-client/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-service/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/one-node-test/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/build.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client-config.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server-config.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server.xml delete mode 100644 branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/operation-overloading/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java delete mode 100644 branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java delete mode 100644 branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java delete mode 100644 branches/sca-java-2.0-M4/itest/operation-overloading/src/main/resources/OperationOverload.composite delete mode 100644 branches/sca-java-2.0-M4/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/resources/Customer.composite delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/resources/LoggingMessages.properties delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/definitions.xml delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/main/resources/Payment.composite delete mode 100644 branches/sca-java-2.0-M4/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/properties/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/package-info.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/ConstructorPropertyInjection.composite delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/Outer.composite delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/OuterPropertyTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/PropertyTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/customer.xsd delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/fileProperty.txt delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/manyValuesFileProperty.txt delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/mySimpleService.composite delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcProps.txt delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcprops.xsd delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite delete mode 100644 branches/sca-java-2.0-M4/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/resources/AutoWiredReferencesTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/resources/InnerReferencesTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/main/resources/ManualWiredReferencesTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/scaclient-api/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldService.java delete mode 100644 branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/Helloworld.composite delete mode 100644 branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/scdl/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/scdl/src/test/resources/test.composite delete mode 100644 branches/sca-java-2.0-M4/itest/scopes/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java delete mode 100644 branches/sca-java-2.0-M4/itest/scopes/src/main/resources/scopes.composite delete mode 100644 branches/sca-java-2.0-M4/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeA/CompositeA.composite delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeB/CompositeB.composite delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/main/resources/ServicesTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java delete mode 100644 branches/sca-java-2.0-M4/itest/wires/pom.xml delete mode 100644 branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java delete mode 100644 branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java delete mode 100644 branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java delete mode 100644 branches/sca-java-2.0-M4/itest/wires/src/main/resources/WireTest.composite delete mode 100644 branches/sca-java-2.0-M4/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java (limited to 'branches/sca-java-2.0-M4/itest') diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/pom.xml b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/pom.xml deleted file mode 100644 index 624e1dffa7..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/pom.xml +++ /dev/null @@ -1,288 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-bpel - 2.0-M4-SNAPSHOT - ../../pom.xml - - itest-bpel-helloworld-reference - Apache Tuscany SCA iTest HelloWorld Reference BPEL - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - - - - xerces - xercesImpl - 2.8.0 - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-surefire-plugin - - 2.3.1 - - false - false - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - generate-sources - - unpack - - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - true - ${project.build.directory}/test-classes/ - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Djava.endorsed.dirs=target/endorsed - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - generate-sources - - copy - - - - - javax.xml.ws - jaxws-api - 2.1 - jar - - - javax.xml.bind - jaxb-api - 2.1 - jar - - - ${project.build.directory}/endorsed - false - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-test-source - generate-sources - - add-test-source - - - - target/jaxws-source - - - - - - - org.codehaus.mojo - jaxws-maven-plugin - 1.12 - - - - javax.jws - jsr181-api - 1.0-MR1 - - - javax.annotation - jsr250-api - 1.0 - - - - - wsimport - generate-test-sources - - wsimport - - - org.apache.tuscany.implementation.bpel.example.helloworld - ${basedir}/src/test/resources/helloworld/ - - helloworld.wsdl - - ${project.build.directory}/jaxws-source - false - true - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java deleted file mode 100644 index d7dff093f9..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 greetings; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface GreetingsService { - - public String getGreetings(String name); -} - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java deleted file mode 100644 index 5ecf5494be..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 greetings; - -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(GreetingsService.class) -public class GreetingsServiceImpl implements GreetingsService { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java deleted file mode 100644 index 24ab0a4181..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 greetings; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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; - -/** - * Tests the Greetings service - * - * @version $Rev$ $Date$ - */ -public class GreetingsTestCase { - - private static Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("greetings/greetings.composite"); - node = NodeFactory.newInstance().createNode("greetings/greetings.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testInvoke() { - GreetingsService greetingsService = node.getService(GreetingsService.class, "GreetingsServiceComponent"); - String response = greetingsService.getGreetings("Luciano"); - Assert.assertEquals("Hello Luciano", response); - } -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java deleted file mode 100644 index f46893481b..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.Remotable; - -/** - * The interface for the helloworld service - */ -@Remotable -public interface HelloWorldService { - public String hello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index a687534bb2..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 greetings.GreetingsService; - -import org.oasisopen.sca.annotation.Reference; - -/** - * The HelloWorld service implementation - */ -public class HelloWorldServiceImpl implements HelloWorldService { - - protected GreetingsService greetingsService; - - public GreetingsService getGreetingsService() { - System.out.println("Got Injected greetingsService"); - return greetingsService; - } - - @Reference - public void setGreetingsService(GreetingsService greetingsService) { - System.out.println("Injected greetingsService"); - this.greetingsService = greetingsService; - } - - public String hello(String name) { - System.out.println("Calling greeting services getGreetings"); - return greetingsService.getGreetings(name); - } -} \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index a9268ac1b5..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 junit.framework.Assert; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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; - -/** - * Tests the BPEL Helloworld Service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldTestCase { - private static Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite"); - node = NodeFactory.newInstance().createNode("helloworld/helloworld.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testServiceInvocation() { - HelloWorldService bpelService = node.getService(HelloWorldService.class, "HelloWorldService"); - String response = bpelService.hello("Luciano"); - Assert.assertEquals("Hello Luciano", response); - } -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite deleted file mode 100644 index faa10b90ca..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl deleted file mode 100644 index b976a53970..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index c0317687df..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - $helloMessage.TestPart - $greetingsRequest.request - - - - - - - - $greetingsResponse.parameters/greetings:GreetingsResponse - $helloMessageResponse.TestPart - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index 590f05ee84..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index 541a713112..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/log4j.properties b/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/log4j.properties deleted file mode 100644 index 4e13380e0b..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-reference/src/test/resources/log4j.properties +++ /dev/null @@ -1,36 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/pom.xml b/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/pom.xml deleted file mode 100644 index 0e4f8dbef8..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/pom.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-bpel - 2.0-M4-SNAPSHOT - ../../pom.xml - - itest-bpel-helloworld-ws - - Apache Tuscany SCA iTest HelloWorld BPEL Over Web Services - - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - runtime - - - - xerces - xercesImpl - 2.8.1 - - - - org.apache.tuscany.sca - tuscany-host-jetty - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-surefire-plugin - - 2.3.1 - - false - false - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - unpack - test-compile - - unpack - - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - - 1.1 - zip - true - ${project.build.directory}/test-classes/ - - - - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-bpel-helloworld - generate-sources - - - ${basedir}/src/test/resources/helloworld/helloworld.wsdl - - ${basedir}/target/wsdl2java-source - - HelloWorld - true - true - true - - - generate - - - - - - org.apache.tuscany.sca - tuscany-maven-wsdl2java - - 1.6-SNAPSHOT - - - - - - - ${basedir}/src/test/resources/helloworld/helloworld.wsdl - - - - - - generate - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java deleted file mode 100644 index 0999e97065..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.oasisopen.sca.annotation.Reference; - -/** - * @version $Rev$ $Date$ - */ -public class HelloWorld { - private HelloPortType helloService; - - public HelloWorld() { - super(); - } - - @Reference - public void setHelloService(HelloPortType helloService){ - this.helloService = helloService; - } - - public String hello(String hello) throws java.rmi.RemoteException { - System.out.println(">>> Invoking helloService.hello with : " + hello); - return this.helloService.hello(hello); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index 315591fb98..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 java.io.IOException; -import java.net.Socket; - -import junit.framework.Assert; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -/** - * Tests the BPEL Helloworld Service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldTestCase { - - private Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - protected void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite"); - node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - protected void tearDown() throws Exception { - node.stop(); - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - public void testServiceInvocation() throws Exception { - HelloPortType bpelService = node.getService(HelloPortType.class, "BPELHelloWorldServiceComponent"); - String response = bpelService.hello("Hello"); - Assert.assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel b/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index 8cf91adc2c..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index f42325910d..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index 610bda3cc4..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/log4j.properties b/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/log4j.properties deleted file mode 100644 index 37f66e4189..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld-ws/src/test/resources/log4j.properties +++ /dev/null @@ -1,36 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld/pom.xml b/branches/sca-java-2.0-M4/itest/bpel/helloworld/pom.xml deleted file mode 100644 index fc0f67fcf5..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld/pom.xml +++ /dev/null @@ -1,270 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-bpel - 2.0-M4-SNAPSHOT - ../../pom.xml - - itest-bpel-helloworld - Apache Tuscany SCA iTest HelloWorld BPEL - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-runtime - 2.0-M4-SNAPSHOT - runtime - - - - xerces - xercesImpl - 2.8.1 - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-surefire-plugin - - 2.3.1 - - false - false - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - test-compile - - unpack - - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - true - ${project.build.directory}/test-classes/ - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -Djava.endorsed.dirs=target/endorsed - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - generate-sources - - copy - - - - - javax.xml.ws - jaxws-api - 2.1 - jar - - - javax.xml.bind - jaxb-api - 2.1 - jar - - - ${project.build.directory}/endorsed - false - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.0 - - - add-test-source - generate-sources - - add-test-source - - - - target/jaxws-source - - - - - - - org.codehaus.mojo - jaxws-maven-plugin - 1.12 - - - - javax.jws - jsr181-api - 1.0-MR1 - - - javax.annotation - jsr250-api - 1.0 - - - - - wsimport - generate-test-sources - - wsimport - - - org.apache.tuscany.implementation.bpel.example.helloworld - ${basedir}/src/test/resources/helloworld/ - - helloworld.wsdl - - ${project.build.directory}/jaxws-source - false - true - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java deleted file mode 100644 index 0999e97065..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.oasisopen.sca.annotation.Reference; - -/** - * @version $Rev$ $Date$ - */ -public class HelloWorld { - private HelloPortType helloService; - - public HelloWorld() { - super(); - } - - @Reference - public void setHelloService(HelloPortType helloService){ - this.helloService = helloService; - } - - public String hello(String hello) throws java.rmi.RemoteException { - System.out.println(">>> Invoking helloService.hello with : " + hello); - return this.helloService.hello(hello); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java b/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java deleted file mode 100644 index 86e6e4e9c5..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 junit.framework.Assert; - -import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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; - -/** - * Tests the BPEL Helloworld Service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldTestCase { - - private static Node node; - - /** - * @throws java.lang.Exception - */ - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite"); - node = NodeFactory.newInstance().createNode("helloworld/helloworld.composite", new Contribution("c1", location)); - node.start(); - } - - /** - * @throws java.lang.Exception - */ - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testServiceInvocation() throws Exception { - HelloPortType bpelService = node.getService(HelloPortType.class, "BPELHelloWorldService"); - String response = bpelService.hello("Hello"); - Assert.assertEquals("Hello World", response); - } - - @Test - public void testReferenceInvocation() throws Exception { - HelloWorld bpelService = node.getService(HelloWorld.class, "BPELHelloWorld"); - String response = bpelService.hello("Hello"); - Assert.assertEquals("Hello World", response); - } -} diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel b/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index 156e32e9ee..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - concat($helloMessage.TestPart/test:message/text(), ' World') - - - - - - - - Dummy - - - - - - - - $helloMessageResponse.TestResponse/test:messageResponse - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite b/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite deleted file mode 100644 index 832c8f3702..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index c77318e8fd..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/log4j.properties b/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/log4j.properties deleted file mode 100644 index 37f66e4189..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/helloworld/src/test/resources/log4j.properties +++ /dev/null @@ -1,36 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG -log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n diff --git a/branches/sca-java-2.0-M4/itest/bpel/pom.xml b/branches/sca-java-2.0-M4/itest/bpel/pom.xml deleted file mode 100644 index fe4f206ca4..0000000000 --- a/branches/sca-java-2.0-M4/itest/bpel/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-bpel - pom - Apache Tuscany SCA BPEL Integration Tests - - - helloworld - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/pom.xml b/branches/sca-java-2.0-M4/itest/builder/pom.xml deleted file mode 100644 index ea51a8e879..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-builder - Apache Tuscany SCA iTest Builder - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-monitor - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-sca-runtime - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-assembly - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-core-databinding - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-M4-SNAPSHOT - test - - - - xerces - xercesImpl - 2.8.1 - test - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java b/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java deleted file mode 100644 index b0dc7a6389..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class, Service3a.class}) -public class ComponentDImpl implements Service3, Service3a { - - @Reference - protected Service3a reference3; - - public String getGreetings(String name) { - return "Hello, " + name + "!"; - } - - public String getGreetings2(String name) { - return "Goodbye, " + name + "!"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java b/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java deleted file mode 100644 index bf73a64027..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import java.util.List; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class, Service3a.class}) -public class ComponentDReferenceMultiplicityImpl implements Service3, Service3a { - - @Reference - protected Service3a reference3; - - @Reference - protected List reference3a; - - public String getGreetings(String name) { - return "Hello, " + name + "!"; - } - - public String getGreetings2(String name) { - return "Goodbye, " + name + "!"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java b/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java deleted file mode 100644 index 6f36b1c55a..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import org.oasisopen.sca.annotation.Service; - - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class}) -public class ComponentEImpl implements Service3 { - - - public String getGreetings(String name) { - return "Hello, " + name + " from ComponentE"; - } -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java b/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java deleted file mode 100644 index 8c5c5de208..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import org.oasisopen.sca.annotation.Service; - - -/** - * Implementation class for ComponentD. - * - * @version $Rev$ $Date$ - */ -@Service({Service3.class}) -public class ComponentFImpl implements Service3 { - - - public String getGreetings(String name) { - return "Hello, " + name + " from ComponentF"; - } -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java b/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java deleted file mode 100644 index f4b8d2cf39..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import org.oasisopen.sca.annotation.Remotable; - - -/** - * Interface for Service3 in ComponentD. - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface Service3 { - - String getGreetings(String name); - -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java b/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java deleted file mode 100644 index 299f7606e3..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import org.oasisopen.sca.annotation.Remotable; - - -/** - * Interface for Service3a in ComponentD. - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface Service3a { - - String getGreetings2(String name); - -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml deleted file mode 100644 index d8cb23bbd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1.composite deleted file mode 100644 index 4e58cdfa16..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1a.composite deleted file mode 100644 index 06b273c7a7..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario1/scenario1a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml deleted file mode 100644 index ac01b3c687..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10.composite deleted file mode 100644 index 2d127a7bec..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10.composite +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10a.composite deleted file mode 100644 index 98103e360e..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/scenario10a.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/service3.wsdl b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/service3.wsdl deleted file mode 100644 index 2477e23dc6..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario10/service3.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml deleted file mode 100644 index 8b82b43c68..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11.composite deleted file mode 100644 index 2f5ca96d07..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11.composite +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11a.composite deleted file mode 100644 index 381ccddcc3..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/scenario11a.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/service3.wsdl b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/service3.wsdl deleted file mode 100644 index 2477e23dc6..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario11/service3.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml deleted file mode 100644 index 4028098023..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12.composite deleted file mode 100644 index 23799f8487..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12a.composite deleted file mode 100644 index a2b4f88dc3..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario12/scenario12a.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml deleted file mode 100644 index 1da59d5f04..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13.composite deleted file mode 100644 index 631e38855f..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13a.composite deleted file mode 100644 index 98976dc4e8..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario13/scenario13a.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml deleted file mode 100644 index b1d01afafb..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2.composite deleted file mode 100644 index 7672595959..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2a.composite deleted file mode 100644 index 2fe3592d12..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario2/scenario2a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml deleted file mode 100644 index 22950dfe03..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3.composite deleted file mode 100644 index 84f42c60fc..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3a.composite deleted file mode 100644 index 18ed91142c..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario3/scenario3a.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml deleted file mode 100644 index a17e27c9d8..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4.composite deleted file mode 100644 index a0bdb0197d..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4a.composite deleted file mode 100644 index 1b4cf27c76..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario4/scenario4a.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml deleted file mode 100644 index 83a232db6e..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5.composite deleted file mode 100644 index 2326afd2f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5.composite +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5a.composite deleted file mode 100644 index fdf1423b66..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenario5a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenarios.wsdl b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario5/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml deleted file mode 100644 index 776dfe4d97..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6.composite deleted file mode 100644 index 9575612d51..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6a.composite deleted file mode 100644 index 9c7b58e2cb..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenario6a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenarios.wsdl b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario6/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml deleted file mode 100644 index ede31d6bee..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7.composite deleted file mode 100644 index e1d2e0cefe..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7a.composite deleted file mode 100644 index ef16dc0785..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenario7a.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenarios.wsdl b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario7/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml deleted file mode 100644 index 7bb9e694a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8.composite deleted file mode 100644 index 467b7f57fa..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8a.composite deleted file mode 100644 index 9d9b5ba945..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenario8a.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenarios.wsdl b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario8/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml deleted file mode 100644 index b6ec160506..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9.composite deleted file mode 100644 index 83584ed482..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9a.composite b/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9a.composite deleted file mode 100644 index 0021ec242b..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/main/resources/scenario9/scenario9a.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java b/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java deleted file mode 100644 index 6d41581371..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java +++ /dev/null @@ -1,814 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.xml.namespace.QName; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Load and build some composites and inspect the results. - * - * @version $Rev$ $Date$ - */ -public class BuilderTestCase { - private CustomCompositeBuilder customBuilder; - - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - /* OASIS doesn't take notice of top level composite services - * - // Scenario 1: on outer composite service CompositeA/Service1 - @Ignore - @Test - public void testScenario1() throws Exception { - System.out.println("====>Running testScenario1"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario1.composite", "TestContribution", "src/main/resources/scenario1/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario1Results(false); - } - - @Ignore - @Test - public void testScenario1NonWiring() throws Exception { - System.out.println("====>Running testScenario1NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario1.composite", "TestContribution", "src/main/resources/scenario1/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario1Results(true); - } - - private void checkScenario1Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - if (!nonWiring) { - // Should create component service $promoted$Service1 on innermost component - // ComponentD, with and uri="/Service1" - // No other services on ComponentD should have - WebServiceBinding wsBinding = null; - for (ComponentService service : componentD.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("$promoted$Service1".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - assert "/Service1".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/$promoted$Service1 with endpoint uri="/Service1" - Definition def = wsBinding.getWSDLDocument(); - javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - Port port = svc.getPort("Service3Port"); - assert "/Service1".equals(TestUtils.getPortAddress(port)); - } else { - // Should not create component service $promoted$Service1 on innermost component ComponentD - // No component services on ComponentD should have - for (ComponentService service : componentD.getServices()) { - assert !"$promoted$Service1".equals(service.getName()); - assert service.getBinding(WebServiceBinding.class) == null; - } - } - - // No services on ComponentB should have - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - for (ComponentService service : componentB.getServices()) { - assert service.getBinding(WebServiceBinding.class) == null; - } - - // No services on CompositeC should have - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario1", "CompositeC")); - for (Service service : compositeC.getServices()) { - assert service.getBinding(WebServiceBinding.class) == null; - } - - if (nonWiring) { - // Should not add a WSDL document to domain composite service Service1 - WebServiceBinding wsBinding = null; - for (Service service : domainComposite.getServices()) { - if ("Service1".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert wsBinding.getWSDLDocument() == null; - } - - String expectedEndpoints = "Component - ComponentB\n" + - "Service - Service2\n" + - "Endpoint - Service2\n" + - "Service - Service2a\n" + - "Endpoint - Service2a\n" + - "Reference - reference2\n" + - "Component - ComponentB has composite impl\n" + - " Component - ComponentD\n" + - " Service - Service3\n" + - " Endpoint - Service3\n" + - " Service - Service3a\n" + - " Endpoint - Service3a\n" + - " Reference - reference3"; - - String actualEndpoints = TestUtils.printEndpoints(domainComposite); - System.out.println(actualEndpoints); - - Assert.assertEquals(expectedEndpoints, actualEndpoints); - } -*/ - - // Scenario 2: on outer component service ComponentB/Service2 - @Test - public void testScenario2() throws Exception { - System.out.println("====>Running testScenario2"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario2.composite", "TestContribution", "src/main/resources/scenario2/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario2", false); - } - - public void testScenario2NonWiring() throws Exception { - System.out.println("====>Running testScenario2NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario2.composite", "TestContribution", "src/main/resources/scenario2/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario2", true); - } - - private void checkScenario2and3Results(String namespace, boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Test that endpoint structure matches expected - String structure = TestUtils.printStructure(domainComposite, ""); - System.out.println(structure); - - String expectedStructure = "Component URI - ComponentB\n" + - " Component URI - ComponentB/ComponentD\n" + - " Endpoint: URI = ComponentB/ComponentD#service-binding(Service3/Service3) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n" + - " Endpoint: URI = ComponentB/ComponentD#service-binding(Service3a/Service3a) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n" + - "Endpoint: URI = ComponentB#service-binding(Service2/Service2) org.apache.tuscany.sca.binding.ws.impl.WebServiceBindingImpl\n" + - "Endpoint: URI = ComponentB#service-binding(Service2a/Service3a) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n"; - - Assert.assertEquals(expectedStructure, structure); - - // Test that generated WSDL matches expected - // Should create WSDL document for ComponentB/Service2 with endpoint uri="/ComponentB/Service2" - // No other services on ComponentB should have - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - WebServiceBinding wsBinding = null; - - for (ComponentService service : componentB.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("Service2".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - - Definition def = wsBinding.getWSDLDocument(); - TestUtils.writeWSDL(def); - - javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - Port port = svc.getPort("Service3Port"); - Assert.assertEquals("/ComponentB/Service2",TestUtils.getPortAddress(port)); - - } -/* - // Scenario 3: on inner composite service CompositeC/Service2 - public void testScenario3() throws Exception { - System.out.println("====>Running testScenario3"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario3.composite", "TestContribution", "src/main/resources/scenario3/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario3", false); - } - - public void testScenario3NonWiring() throws Exception { - System.out.println("====>Running testScenario3NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario3.composite", "TestContribution", "src/main/resources/scenario3/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario2and3Results("http://scenario3", true); - } - - // Scenario 4: on inner component service ComponentD/Service3 - public void testScenario4() throws Exception { - System.out.println("====>Running testScenario4"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario4.composite", "TestContribution", "src/main/resources/scenario4/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario4Results(false); - } - - public void testScenario4NonWiring() throws Exception { - System.out.println("====>Running testScenario4NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario4.composite", "TestContribution", "src/main/resources/scenario4/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario4Results(true); - } - - private void checkScenario4Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should create WSDL document for ComponentD/Service3 with endpoint uri="/ComponentD/Service3" - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - WebServiceBinding wsBinding = null; - for (ComponentService service : componentD.getServices()) { - if ("Service3".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - Definition def = wsBinding.getWSDLDocument(); - javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - Port port = svc.getPort("Service3Port"); - assert "/ComponentB/ComponentD/Service3".equals(TestUtils.getPortAddress(port)); - - // Should add to inner composite service CompositeC/Service2 - // No other services on CompositeC should have - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario4", "CompositeC")); - wsBinding = null; - for (Service service : compositeC.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("Service2".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - assert "/ComponentB/Service2".equals(wsBinding.getURI()); - - // Should add to outer component service ComponentB/Service2 - // Should create WSDL document for ComponentB/Service2 with endpoint uri="/ComponentB/Service2" - // No other services on ComponentB should have - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - wsBinding = null; - for (ComponentService service : componentB.getServices()) { - WebServiceBinding wsb = service.getBinding(WebServiceBinding.class); - if ("Service2".equals(service.getName())) { - wsBinding = wsb; - } else { - assert wsb == null; - } - } - assert "/ComponentB/Service2".equals(wsBinding.getURI()); - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - port = svc.getPort("Service3Port"); - assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port)); - - if (!nonWiring) { - // Should create component service $promoted$ComponentB$slash$Service2 on innermost component - // ComponentD, with and uri="/ComponentB/Service2" - wsBinding = null; - for (ComponentService service : componentD.getServices()) { - if ("$promoted$ComponentB$slash$Service2".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert "/ComponentB/Service2".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/$promoted$ComponentB$slash$Service2 with endpoint uri="/ComponentB/Service2" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - port = svc.getPort("Service3Port"); - assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port)); - } else { - // Should not create component service $promoted$ComponentB$slash$Service2 on innermost component ComponentD - for (ComponentService service : componentD.getServices()) { - assert !"$promoted$ComponentB$slash$Service2".equals(service.getName()); - } - } - - // Should add to outer composite service CompositeA/Service1 - wsBinding = null; - for (Service service : domainComposite.getServices()) { - if ("Service1".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert wsBinding != null; - if (nonWiring) { - // Should not add a WSDL document to domain composite service Service1 - assert wsBinding.getWSDLDocument() == null; - } - - if (!nonWiring) { - // Should create component service $promoted$Service1 on innermost component - // ComponentD, with and uri="/Service1" - wsBinding = null; - for (ComponentService service : componentD.getServices()) { - if ("$promoted$Service1".equals(service.getName())) { - wsBinding = service.getBinding(WebServiceBinding.class); - } - } - assert "/Service1".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/$promoted$Service1 with endpoint uri="/Service1" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - port = svc.getPort("Service3Port"); - assert "/Service1".equals(TestUtils.getPortAddress(port)); - } else { - // Should not create component service $promoted$.Service1 on innermost component ComponentD - for (ComponentService service : componentD.getServices()) { - assert !"$promoted$Service1".equals(service.getName()); - } - } - - // No services on ComponentD should have , except for Service3, - // $promoted$.Service1 and $promoted$.ComponentB.Service2 - for (ComponentService service : componentD.getServices()) { - if (!"Service3".equals(service.getName()) && - !"$promoted$Service1".equals(service.getName()) && - !"$promoted$ComponentB$slash$Service2".equals(service.getName())) { - assert service.getBinding(WebServiceBinding.class) == null; - } - } - } - - // Scenario 5: and on outer composite reference CompositeA/reference1 - @Test - public void testScenario5() throws Exception { - System.out.println("====>Running testScenario5"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario5.composite", "TestContribution", "src/main/resources/scenario5/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario5Results(false); - } - - @Test - public void testScenario5NonWiring() throws Exception { - System.out.println("====>Running testScenario5NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario5.composite", "TestContribution", "src/main/resources/scenario5/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario5Results(true); - } - - private void checkScenario5Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should not add to any outer component references - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - for (ComponentReference reference : componentB.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - } - - Definition def; - javax.wsdl.Service svc; - Port port; - WebServiceBinding wsBinding; - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - if (!nonWiring) { - // Should add to inner component reference ComponentD/reference3 with uri="http://foo.com/bar" - // Should set on inner component reference ComponentD/reference3 - wsBinding = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract(wsBinding) instanceof WSDLInterfaceContract; - } - } - assert "http://foo.com/bar".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentD/reference3", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } else { - // Should not add to any inner component references - for (ComponentReference reference : componentD.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - } - } - - // Should not add or to inner composite reference CompositeC/reference2 - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario5", "CompositeC")); - for (Reference reference : compositeC.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - assert reference.getInterfaceContract() instanceof JavaInterfaceContract; - } - - String expectedEndpoints = "Component - ComponentB\n" + - "Service - Service2\n" + - "Endpoint - Service2\n" + - "Service - Service2a\n" + - "Endpoint - Service2a\n" + - "Reference - reference2\n" + - "Component - ComponentB has composite impl\n" + - " Component - ComponentD\n" + - " Service - Service3\n" + - " Endpoint - Service3\n" + - " Service - Service3a\n" + - " Endpoint - Service3a\n" + - " Reference - reference3"; - - String actualEndpoints = TestUtils.printEndpoints(domainComposite); - System.out.println(actualEndpoints); - - Assert.assertEquals(expectedEndpoints, actualEndpoints); - } - - - // Scenario 6: and on outer component reference ComponentB/reference2 - @Ignore - @Test - public void testScenario6() throws Exception { - System.out.println("====>Running testScenario6"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario6.composite", "TestContribution", "src/main/resources/scenario6/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario6", false); - } - - @Ignore - @Test - public void testScenario6NonWiring() throws Exception { - System.out.println("====>Running testScenario6NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario6.composite", "TestContribution", "src/main/resources/scenario6/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario6", true); - } - - private void checkScenario6and7Results(String namespace, boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should remove target= on ComponentB/reference2 (for Scenario 6) or - // CompositeC/reference2 (for Scenario 7), and add uri="http://foo.com/bar" - // to the element on ComponentB/reference2 - // For nonWiring, ComponentB/reference2 should have target= - // and no uri= should be added - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - WebServiceBinding wsBinding = null; - for (ComponentReference reference : componentB.getReferences()) { - if ("reference2".equals(reference.getName())) { - if (!nonWiring) { - assert reference.getTargets().size() == 0; - } else { - assert reference.getTargets().size() == 1; - } - wsBinding = reference.getBinding(WebServiceBinding.class); - } - } - if (!nonWiring) { - assert "http://foo.com/bar".equals(wsBinding.getURI()); - } else { - assert wsBinding.getURI() == null; - } - - Definition def; - javax.wsdl.Service svc; - Port port; - if (!nonWiring) { - // Should create WSDL document for ComponentB/reference2 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentB/reference2", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - if (!nonWiring) { - // Should add to inner component reference ComponentD/reference3 with uri="http://foo.com/bar" - // Should set on inner component reference ComponentD/reference3 - wsBinding = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getBindings().size() == 1; - assert reference.getInterfaceContract(wsBinding) instanceof WSDLInterfaceContract; - } - } - assert "http://foo.com/bar".equals(wsBinding.getURI()); - - // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentB/reference2", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } else { - // Should not add to any inner component references - for (ComponentReference reference : componentD.getReferences()) { - assert reference.getBinding(WebServiceBinding.class) == null; - } - } - - // No references on CompositeC should have or , except for - // reference2 in Scenario 7 - Composite compositeC = TestUtils.getComposite(domainComposite, new QName(namespace, "CompositeC")); - for (Reference reference : compositeC.getReferences()) { - if ("http://scenario7".equals(namespace) && "reference2".equals(reference.getName())) { - assert reference.getBinding(WebServiceBinding.class)!= null; - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } else { - assert reference.getBinding(WebServiceBinding.class) == null; - assert reference.getInterfaceContract() instanceof JavaInterfaceContract; - } - } - - // Should add and to outer composite reference CompositeA/reference1 - wsBinding = null; - for (Reference reference : domainComposite.getReferences()) { - if ("reference1".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should not add a WSDL document to domain composite reference reference1 - assert wsBinding.getWSDLDocument() == null; - - String expectedEndpoints = "Component - ComponentB\n" + - "Service - Service2\n" + - "Endpoint - Service2\n" + - "Service - Service2a\n" + - "Endpoint - Service2a\n" + - "Reference - reference2\n" + - "Component - ComponentB has composite impl\n" + - " Component - ComponentD\n" + - " Service - Service3\n" + - " Endpoint - Service3\n" + - " Service - Service3a\n" + - " Endpoint - Service3a\n" + - " Reference - reference3"; - - String actualEndpoints = TestUtils.printEndpoints(domainComposite); - System.out.println(actualEndpoints); - - Assert.assertEquals(expectedEndpoints, actualEndpoints); - } - - // Scenario 7: and on inner composite reference CompositeC/reference2 - public void testScenario7() throws Exception { - System.out.println("====>Running testScenario7"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario7.composite", "TestContribution", "src/main/resources/scenario7/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario7", false); - } - - public void testScenario7NonWiring() throws Exception { - System.out.println("====>Running testScenario7NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario7.composite", "TestContribution", "src/main/resources/scenario7/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario6and7Results("http://scenario7", true); - } - - // Scenario 8: and on inner component reference ComponentD/reference3 - public void testScenario8() throws Exception { - System.out.println("====>Running testScenario8"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario8.composite", "TestContribution", "src/main/resources/scenario8/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario8Results(false); - } - - public void testScenario8NonWiring() throws Exception { - System.out.println("====>Running testScenario8NonWiring"); - customBuilder = new CustomCompositeBuilder(true); - customBuilder.loadContribution("scenario8.composite", "TestContribution", "src/main/resources/scenario8/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario8Results(true); - } - - private void checkScenario8Results(boolean nonWiring) { - Composite domainComposite = customBuilder.getDomainComposite(); - - // Should replace target= on ComponentD/reference3 by uri="http://foo.com/bar" on - // For nonWiring, the original target= is preserved and there is no uri= - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - WebServiceBinding wsBinding = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3".equals(reference.getName())) { - if (!nonWiring) { - assert reference.getTargets().size() == 0; - } else { - assert reference.getTargets().size() == 1; - } - wsBinding = reference.getBinding(WebServiceBinding.class); - } - } - if (!nonWiring) { - assert "http://foo.com/bar".equals(wsBinding.getURI()); - } else { - assert wsBinding.getURI() == null; - } - - Definition def; - javax.wsdl.Service svc; - Port port; - if (!nonWiring) { - // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar" - def = wsBinding.getWSDLDocument(); - svc = def.getService(new QName("http://scenarios/ComponentD/reference3", "Service3aService")); - port = svc.getPort("Service3aPort"); - assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port)); - } - - // Should add and to inner composite reference CompositeC/reference2 - Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario8", "CompositeC")); - wsBinding = null; - for (Reference reference : compositeC.getReferences()) { - if ("reference2".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should add and to outer component reference ComponentB/reference2 - Component componentB = TestUtils.getComponent(domainComposite, "ComponentB"); - wsBinding = null; - for (ComponentReference reference : componentB.getReferences()) { - if ("reference2".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should add and to outer composite reference CompositeA/reference1 - wsBinding = null; - for (Reference reference : domainComposite.getReferences()) { - if ("reference1".equals(reference.getName())) { - wsBinding = reference.getBinding(WebServiceBinding.class); - assert reference.getInterfaceContract() instanceof WSDLInterfaceContract; - } - } - assert wsBinding.getURI() == null; - - // Should not add a WSDL document to domain composite reference reference1 - assert wsBinding.getWSDLDocument() == null; - } - - // Scenario 9: target in reference CDR3A and binding.ws uri= at CAR1A - public void testScenario9() throws Exception { - System.out.println("====>Running testScenario9"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario9.composite", "TestContribution", "src/main/resources/scenario9/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario9Results(); - } - - private void checkScenario9Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 2); - assertTrue(reference.getBindings().get(0) instanceof SCABinding); - assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding); - } - } - assertTrue(componentRef != null); - } - - // Scenario 10: targets in references CBR2A and CDR3A and binding.ws at CBR2A - public void testScenario10() throws Exception { - System.out.println("====>Running testScenario10"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario10.composite", "TestContribution", "src/main/resources/scenario10/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario10And11Results(); - } - - // Scenario 11: targets in references CBR2A and CDR3A and binding.ws at CCR2A - public void testScenario11() throws Exception { - System.out.println("====>Running testScenario11"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario11.composite", "TestContribution", "src/main/resources/scenario11/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario10And11Results(); - } - - private void checkScenario10And11Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 2); - Binding binding1 = reference.getBindings().get(0); - assertTrue(binding1 instanceof SCABinding); - assertTrue(reference.getInterfaceContract(binding1) instanceof JavaInterfaceContract); - Binding binding2 = reference.getBindings().get(1); - assertTrue(binding2 instanceof WebServiceBinding); - assertTrue(reference.getInterfaceContract(binding2) instanceof WSDLInterfaceContract); - } - } - assertTrue(componentRef != null); - } - - // Scenario 12: targets in references CBR2A and CDR3A and binding.ws at CDR3A - public void testScenario12() throws Exception { - System.out.println("====>Running testScenario12"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario12.composite", "TestContribution", "src/main/resources/scenario12/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario12Results(); - } - - private void checkScenario12Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 2); - assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding); - assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding); - } - } - assertTrue(componentRef != null); - } - - // Scenario 13: target in reference CDR3A - public void testScenario13() throws Exception { - System.out.println("====>Running testScenario13"); - customBuilder = new CustomCompositeBuilder(false); - customBuilder.loadContribution("scenario13.composite", "TestContribution", "src/main/resources/scenario13/"); - //TestUtils.printResults(customBuilder); - TestUtils.checkProblems(customBuilder); - checkScenario13Results(); - } - - private void checkScenario13Results() { - Composite domainComposite = customBuilder.getDomainComposite(); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - ComponentReference componentRef = null; - for (ComponentReference reference : componentD.getReferences()) { - if ("reference3a".equals(reference.getName())) { - componentRef = reference; - assertTrue(reference.getBindings().size() == 1); - assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding); - } - } - assertTrue(componentRef != null); - } -*/ -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java b/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java deleted file mode 100644 index 27768f3799..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import javax.xml.stream.XMLOutputFactory; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.impl.NodeImpl; -import org.apache.tuscany.sca.runtime.CompositeActivator; - - -public class CustomCompositeBuilder { - - private boolean nonWiring; - private Node node; - private ExtensionPointRegistry extensionPoints; - private Monitor monitor; - private StAXArtifactProcessor compositeProcessor; - - public CustomCompositeBuilder(boolean nonWiring) { - this.nonWiring = nonWiring; - } - - public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception { - NodeFactory nodeFactory = NodeFactory.newInstance(); - node = nodeFactory.createNode(compositeURL, new Contribution(sourceURI, sourceURL)); - node.start(); - - // get some things out of the extension registry - extensionPoints = ((NodeImpl)node).getExtensionPoints(); - - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); - monitor = monitorFactory.createMonitor(); - - StAXArtifactProcessorExtensionPoint xmlProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); - compositeProcessor = xmlProcessors.getProcessor(Composite.class); - - CompositeActivator compositeActivator = utilities.getUtility(CompositeActivator.class); - } - - /** - * Returns the delegating model processor. - * @return the delegating model processor - */ - public StAXArtifactProcessor getModelProcessor() { - return null;//compositeProcessor; - } - - /** - * Returns the XML output factory. - * @return the XML output factory - */ - public XMLOutputFactory getOutputFactory() { - return null; //outputFactory; - } - - /** - * Returns the domain composite. - * @return the domain composite model object - */ - public Composite getDomainComposite() { - return (Composite) ((NodeImpl)node).getDomainComposite(); - } - - /** - * Returns the monitor. - * @return the monitor instance - */ - public Monitor getMonitor() { - return monitor; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java b/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java deleted file mode 100644 index c5eb7a70ea..0000000000 --- a/branches/sca-java-2.0-M4/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.builder; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.WSDLException; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap12.SOAP12Address; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLWriter; -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.stream.XMLStreamWriter; - -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Contract; -import org.apache.tuscany.sca.assembly.Endpoint; -import org.apache.tuscany.sca.assembly.EndpointReference; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.impl.EndpointImpl; -import org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.contribution.processor.ProcessorContext; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; -import org.w3c.dom.Document; - -/** - * Static utility methods for use by test cases. - * - * @version $Rev$ $Date$ - */ -public class TestUtils { - - protected static void checkProblems(CustomCompositeBuilder customBuilder) throws Exception { - boolean problems = false; - for (Problem problem : customBuilder.getMonitor().getProblems()) { - if (problem.getCause() != null) { - problem.getCause().printStackTrace(); - } - if (problem.getSeverity() == Problem.Severity.ERROR){ - problems = true; - } - } - assert !problems; - } - - protected static String getPortAddress(Port port) { - Object ext = port.getExtensibilityElements().get(0); - String returnAddress = null; - if (ext instanceof SOAPAddress) { - returnAddress = ((SOAPAddress)ext).getLocationURI(); - } - if (ext instanceof SOAP12Address) { - returnAddress = ((SOAP12Address)ext).getLocationURI(); - } - - returnAddress = returnAddress.substring(returnAddress.indexOf("//") + 2); - returnAddress = returnAddress.substring(returnAddress.indexOf("/")); - - return returnAddress; - } - - protected static Component getComponent(Composite composite, String name) { - for (Component component : composite.getComponents()) { - if (name.equals(component.getName())) { - return component; - } - // process implementation composites recursively - Implementation impl = component.getImplementation(); - if (impl instanceof Composite) { - Component comp = getComponent((Composite)impl, name); - if (comp != null) { - return comp; - } - } - } - return null; - } - - protected static Composite getComposite(Composite composite, QName name) { - if (name.equals(composite.getName())) { - return composite; - } - for (Component component : composite.getComponents()) { - // process implementation composites recursively - Implementation impl = component.getImplementation(); - if (impl instanceof Composite) { - Composite comp = getComposite((Composite)impl, name); - if (comp != null) { - return comp; - } - } - } - return null; - } - - protected static void printResults(CustomCompositeBuilder customBuilder) throws Exception { - for (Problem problem : customBuilder.getMonitor().getProblems()) { - if (problem.getCause() != null) { - problem.getCause().printStackTrace(); - } - } - Composite domainComposite = customBuilder.getDomainComposite(); - printComposite(domainComposite, customBuilder); - } - - private static void printComposite(Composite composite, CustomCompositeBuilder customBuilder) throws Exception { - // process implementation composites recursively - for (Component component : composite.getComponents()) { - Implementation implementation = component.getImplementation(); - if (implementation instanceof Composite) { - printComposite((Composite)implementation, customBuilder); - } - } - - // write out the SCDL - writeSCDL(composite, customBuilder); - - // find all the component service and reference bindings - for (Component component : composite.getComponents()) { - for (ComponentService componentService : component.getServices()) { - for (Binding binding : componentService.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(component, componentService, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - for (ComponentReference componentReference : component.getReferences()) { - for (Binding binding : componentReference.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(component, componentReference, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - } - - // find all the composite service and reference bindings - for (Service service : composite.getServices()) { - for (Binding binding : service.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(null, service, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - for (Reference reference : composite.getReferences()) { - for (Binding binding : reference.getBindings()) { - if (binding instanceof WebServiceBinding) { - writeWSDL(null, reference, ((WebServiceBinding)binding).getWSDLDocument()); - } - } - } - } - - private static void writeSCDL(Composite composite, CustomCompositeBuilder customBuilder) throws Exception { - // Print out a composite - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - XMLStreamWriter writer = customBuilder.getOutputFactory().createXMLStreamWriter(bos); - customBuilder.getModelProcessor().write(composite, writer, new ProcessorContext()); - - // Parse and write again to pretty format it - DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray())); - OutputFormat format = new OutputFormat(); - format.setIndenting(true); - format.setIndent(2); - XMLSerializer serializer = new XMLSerializer(System.out, format); - System.out.println("-->Runtime SCDL model for composite " + composite.getName()); - serializer.serialize(document); - } - - private static void writeWSDL(Component component, Contract contract, Definition definition) { - if (definition == null) { - System.out.println("-->No generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName()); - } else { - try { - System.out.println("-->Generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName()); - WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter(); - writer.writeWSDL(definition, System.out); - } catch (WSDLException e) { - // ignore - } - } - } - - protected static void writeWSDL(Definition definition) { - try { - WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter(); - writer.writeWSDL(definition, System.out); - } catch (WSDLException e) { - // ignore - } - } - - protected static String printStructure(Composite composite, String indent){ - String structure = ""; - for (Component component : composite.getComponents()){ - structure += indent + "Component URI - " + component.getURI() + "\n"; - - // recurse for composite implementations - Implementation implementation = component.getImplementation(); - if (implementation instanceof Composite) { - structure += printStructure((Composite)implementation, indent + " "); - } - - for (Service service : component.getServices()){ - for (Endpoint endpoint : service.getEndpoints()){ - structure += indent + ((EndpointImpl)endpoint).toStringWithoutHash() + " " + endpoint.getBinding().getClass().getName() + "\n"; - } - } - for (Reference reference : component.getReferences()){ - for (EndpointReference endpointReference : reference.getEndpointReferences()){ - structure += indent + ((EndpointReferenceImpl)endpointReference).toStringWithoutHash() + " " + endpointReference.getBinding().getClass().getName() + "\n"; - } - } - } - return structure; - } -/* - protected static String printEndpoints(Composite composite){ - return printEndpoints(composite, ""); - } - - protected static String printEndpoints(Composite composite, String indent){ - - String buffer = ""; - - for (Component component : composite.getComponents()) { - buffer += indent + "Component - " + component.getName() + "\n"; - - // print component service endpoints - for (ComponentService componentService : component.getServices()) { - buffer += indent + "Service - " + componentService.getName() + "\n"; - for (Endpoint endpoint : componentService.getEndpoints()) { - if (endpoint.getBinding() != null){ - buffer += printEndpoint(endpoint, indent); - } - } - } - - for (ComponentReference componentReference : component.getReferences()) { - buffer += indent + "Reference - " + componentReference.getName() + "\n"; - for (EndpointReference endpointReference : componentReference.getEndpointReferences()) { - buffer += printEndpointReference(endpointReference, indent); - } - } - - // process implementation composites recursively - Implementation implementation = component.getImplementation(); - if (implementation instanceof Composite) { - buffer += indent + "Component - " + component.getName() + " has composite impl" + "\n"; - buffer += printEndpoints((Composite)implementation, indent + " "); - } - } - - return buffer; - } - - protected static String printEndpoint(Endpoint endpoint, String indent){ - String buffer = ""; - - buffer += indent + " Endpoint - Component: " + endpoint.getComponent().getName() +"\n"; - buffer += indent + " Service: " + endpoint.getService().getName() +"\n"; - buffer += indent + " Binding: " + endpoint.getBinding().getName() +"\n"; - - return buffer; - } - - protected static String printEndpointReference(EndpointReference endpointReference, String indent){ - String buffer = ""; - - buffer += indent + " EndpointReference - Component: " + endpointReference.getComponent().getName() +"\n"; - buffer += indent + " Reference: " + endpointReference.getReference().getName() +"\n"; - if (endpointReference.getTargetEndpoint() != null){ - buffer += indent + " Wired: " +"\n"; - buffer += indent + " Target: " + endpointReference.getTargetEndpoint().getComponent().getName()+"\n"; - if (endpointReference.getTargetEndpoint() != null && - endpointReference.getTargetEndpoint().isUnresolved() == false){ - buffer += indent + " Binding: " + endpointReference.getBinding().getName() +"\n"; - buffer += indent + " TargetEndpoint: " + endpointReference.getTargetEndpoint().getBinding().getName()+"\n"; - } else { - buffer += indent + " Unresolved: " +"\n"; - } - } else { - buffer += indent + " NonWired: " +"\n"; - } - - return buffer; - } -*/ -} diff --git a/branches/sca-java-2.0-M4/itest/callback-api/pom.xml b/branches/sca-java-2.0-M4/itest/callback-api/pom.xml deleted file mode 100644 index 489c39089c..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-callback-api - Apache Tuscany SCA iTest Callback API - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - - - ${basedir}/../build-was-integration.xml - ${basedir}/../wasAdmin.py - - diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java b/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java deleted file mode 100644 index b013462f9f..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackApiCallBack { - /** - * This function is defined in CallBackApiClientImpl - */ - void callBackMessage(String aString); - - /** - * This function is defined in CallBackApiClientImpl - */ - void callBackIncrement(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java b/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java deleted file mode 100644 index 252e4dc45f..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackApiClient { - /** - * This function is defined in CallBackApiClientImpl - */ - void run(); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java b/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java deleted file mode 100644 index d883dc2d6f..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackApiClient.class) -public class CallBackApiClientImpl implements CallBackApiClient, CallBackApiCallBack { - - @Reference - protected CallBackApiService aCallBackService; - - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - /** - * This test calls function test 3a,3a1,3b,3c - */ - public void run() { - - // This tests basic callback patterns. - - // Test3a is the basic callback where the target calls back prior to - // returning to the client. - test3a(); - - test3a1(); - - // Test3b is where the target does not call back to the client. - test3b(); - - // Test3c is where the target calls back multiple times to the client. - test3c(); - } - - /** - * This test is the basic callback where the target calls back prior to returning to the client. - */ - - private void test3a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackApiITest - test3a", "Who's There", this.getReturnMessage()); - - } - - /** - * This test is the basic callback where the target calls back prior to returning to the client. - */ - private void test3a1() { - aCallBackService.knockKnockByRef("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackApiITest - test3a", "Who's There", this.getReturnMessage()); - - } - - /** - * This test is the basic callback where the target does not call back to the client - */ - private void test3b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackApiITest - test3b", 1, 1); - } - - /** - * This test is the basic callback where the target calls back multiple times to the client - */ - - private void test3c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackApiITest - test3c", 3, this.getCallBackCount()); - } - - /** - * This function returns a string - * - * @param void - * @return String result string - */ - - public String getReturnMessage() { - return returnMessage; - } - - /** - * This function set the returnMessage string - * - * @param String - */ - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - /** - * This function returns the callBackCount variable - * - * @return Integer callBackCount variable - */ - public int getCallBackCount() { - return callBackCount; - } - - /** - * This function increments callBackCount variable by 1 - */ - public void incrementCallBackCount() { - callBackCount++; - } - - /** - * This function prints a message synched with setReturnMessage function - * - * @param String - */ - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - /** - * This function prints a message synched with incrementCallBackCount function - * - * @param String - */ - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java b/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java deleted file mode 100644 index afb7c45e2c..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackApiCallBack.class) -/** - * - */ -public interface CallBackApiService { - /** - * This function is defined in CallBackApiServiceImpl - */ - void knockKnock(String aString); - - /** - * This function is defined in CallBackApiServiceImpl - */ - void knockKnockByRef(String aString); - - /** - * This function is defined in CallBackApiServiceImpl - */ - void noCallBack(String aString); - - /** - * This function is defined in CallBackApiServiceImpl - */ - void multiCallBack(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java b/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java deleted file mode 100644 index 44f57b4316..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackApiService.class) -public class CallBackApiServiceImpl implements CallBackApiService { - - @Context - protected ComponentContext componentContext; - /** - * Object of CallBackApiCallBack class - */ - private CallBackApiCallBack callback; - - @Callback - protected ServiceReference callbackRef; - - /** - * This function get an object of CallBackApiServiceImpl by calling getCallBackInterface function and calls the - * callBackMessage function. - * - * @param aString String passed by a function call - */ - - public void knockKnock(String aString) { - - System.out.println("CallBackApiServiceImpl message received: " + aString); - callback = this.getCallBackInterface(); - callback.callBackMessage("Who's There"); - System.out.println("CallBackApiServiceImpl response sent"); - } - - /** - * This function calls the callBackMessage function.
- * The reference to this function is received from Call back reference to the class CallBackApiService. - * - * @param aString String passed by a function call - */ - public void knockKnockByRef(String aString) { - - System.out.println("CallBackApiServiceImpl message received: " + aString); - callbackRef.getService().callBackMessage("Who's There"); - System.out.println("CallBackApiServiceImpl response sent"); - } - - /** - * This function get an object of CallBackApiServiceImpl by calling getCallBackInterface function.
- * This function then places multiple callBack using the callbackIncrement function defined in - * callBack.ApiServiceImpl - * - * @param aString String passed by a function call - */ - public void multiCallBack(String aString) { - - callback = this.getCallBackInterface(); - - System.out.println("CallBackApiServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackApiServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackApiServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackApiServiceImpl response sent"); - } - - /** - * This function does not callBack any function. - * - * @param aString String passed by a function call - */ - public void noCallBack(String aString) { - System.out.println("CallBackApiServiceImpl message received: " + aString); - } - - /** - * This function get an object of CallBackApiServiceImpl from the present componentContext - * - * @param void - */ - private CallBackApiCallBack getCallBackInterface() { - System.out.println("CallBackApiServiceImpl getting request context"); - RequestContext rc = componentContext.getRequestContext(); - System.out.println("CallBackApiServiceImpl getting callback from request context"); - callback = rc.getCallback(); - System.out.println("CallBackApiServiceImpl returning callback"); - return callback; - - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/CallBackApiTest.composite b/branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/CallBackApiTest.composite deleted file mode 100644 index 309311e258..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/CallBackApiTest.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 55736e5254..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java b/branches/sca-java-2.0-M4/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java deleted file mode 100644 index 75fab95efb..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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 CallBackApiTestCase { - - private static Node node; - private CallBackApiClient aCallBackClient; - - /** - * This function uses the Instance of CallBackApiClient.class
- * This function calls the run function defined in the CallBackApiClinet Interface
- * which in turn executes the following test cases.
- * 1. Basic callback patterns
- * 2. Test in which the target does not call back to the client
- * 3. Test in which the target calls back multiple times to the client. - */ - @Test - public void testCallBackBasic() { - aCallBackClient = node.getService(CallBackApiClient.class, "CallBackApiClient"); - aCallBackClient.run(); - } - - /** - * This function creates the Node instance and gets an Instance of CallBackApiClient.class - */ - - @BeforeClass - public static void setUp() throws Exception { - if (node == null) { - String location = ContributionLocationHelper.getContributionLocation("CallBackApiTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location)); - node.start(); - } - } - - /** - * This function destroys the Node instance that was created in setUp() - */ - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/pom.xml b/branches/sca-java-2.0-M4/itest/callback-basic-ws/pom.xml deleted file mode 100644 index 6f00bcb668..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-callback-basic-ws - Apache Tuscany SCA iTest Callback Basic WebServices - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-host-http - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-M4-SNAPSHOT - test - - - - - ${basedir}/../build-was-integration.xml - ${basedir}/../wasAdmin.py - - diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java deleted file mode 100644 index 291a72b9d6..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackBasicCallBack { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java deleted file mode 100644 index 19f366c423..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackBasicClient { - - void run(); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java deleted file mode 100644 index 4bb6b29a8d..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicClient.class) -public class CallBackBasicClientImpl implements CallBackBasicClient, CallBackBasicCallBack { - - @Reference - protected CallBackBasicService aCallBackService; - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - public void run() { - - // This tests basic callback patterns. - - // Test1 is the basic callback where the target calls back prior to - // returning to the client. - test1a(); - - // Test2 is where the target does not call back to the client. - test1b(); - - // Test3 is where the target calls back multiple times to the client. - test1c(); - } - - private void test1a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1a", "Who's There", this.getReturnMessage()); - - } - - private void test1b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackBasicITest - test1b", 1, 1); - } - - private void test1c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1c", 3, this.getCallBackCount()); - } - - public String getReturnMessage() { - return returnMessage; - } - - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - public int getCallBackCount() { - return callBackCount; - } - - public void incrementCallBackCount() { - callBackCount++; - } - - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java deleted file mode 100644 index 5396879e83..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackBasicCallBack.class) -/** - * - */ -public interface CallBackBasicService { - - void knockKnock(String aString); - - void noCallBack(String aString); - - void multiCallBack(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java deleted file mode 100644 index 07010f61e1..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicService.class) -public class CallBackBasicServiceImpl implements CallBackBasicService { - - @Callback - protected CallBackBasicCallBack callback; - - public void knockKnock(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void multiCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void noCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - // System.out.println("CallBackBasicServiceImpl No response desired"); - - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite deleted file mode 100644 index db1a2fbf6a..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b58fabcd79..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java deleted file mode 100644 index 43b812faed..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class CallBackBasicTestCase { - - private static Node node; - private CallBackBasicClient aCallBackClient; - - @Test - public void testCallBackBasic() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - if (node == null) { - String location = ContributionLocationHelper.getContributionLocation("CallBackBasicTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackBasicTest.composite", new Contribution("c1", location)); - node.start(); - } - - aCallBackClient = node.getService(CallBackBasicClient.class, "CallBackBasicClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/pom.xml b/branches/sca-java-2.0-M4/itest/callback-basic/pom.xml deleted file mode 100644 index 1a743c224a..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-callback-basic - Apache Tuscany SCA iTest Callback Basic - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - - - ${basedir}/../build-was-integration.xml - ${basedir}/../wasAdmin.py - - diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java deleted file mode 100644 index 291a72b9d6..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackBasicCallBack { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java deleted file mode 100644 index 19f366c423..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackBasicClient { - - void run(); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java deleted file mode 100644 index 4bb6b29a8d..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicClient.class) -public class CallBackBasicClientImpl implements CallBackBasicClient, CallBackBasicCallBack { - - @Reference - protected CallBackBasicService aCallBackService; - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - public void run() { - - // This tests basic callback patterns. - - // Test1 is the basic callback where the target calls back prior to - // returning to the client. - test1a(); - - // Test2 is where the target does not call back to the client. - test1b(); - - // Test3 is where the target calls back multiple times to the client. - test1c(); - } - - private void test1a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1a", "Who's There", this.getReturnMessage()); - - } - - private void test1b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackBasicITest - test1b", 1, 1); - } - - private void test1c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test1c", 3, this.getCallBackCount()); - } - - public String getReturnMessage() { - return returnMessage; - } - - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - public int getCallBackCount() { - return callBackCount; - } - - public void incrementCallBackCount() { - callBackCount++; - } - - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java deleted file mode 100644 index 5396879e83..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackBasicCallBack.class) -/** - * - */ -public interface CallBackBasicService { - - void knockKnock(String aString); - - void noCallBack(String aString); - - void multiCallBack(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java deleted file mode 100644 index 07010f61e1..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackBasicService.class) -public class CallBackBasicServiceImpl implements CallBackBasicService { - - @Callback - protected CallBackBasicCallBack callback; - - public void knockKnock(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void multiCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackBasicServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackBasicServiceImpl response sent"); - - } - - public void noCallBack(String aString) { - - System.out.println("CallBackBasicServiceImpl message received: " + aString); - // System.out.println("CallBackBasicServiceImpl No response desired"); - - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/CallBackBasicTest.composite b/branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/CallBackBasicTest.composite deleted file mode 100644 index 87cde940e1..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/CallBackBasicTest.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b58fabcd79..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/branches/sca-java-2.0-M4/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java deleted file mode 100644 index 43b812faed..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class CallBackBasicTestCase { - - private static Node node; - private CallBackBasicClient aCallBackClient; - - @Test - public void testCallBackBasic() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - if (node == null) { - String location = ContributionLocationHelper.getContributionLocation("CallBackBasicTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackBasicTest.composite", new Contribution("c1", location)); - node.start(); - } - - aCallBackClient = node.getService(CallBackBasicClient.class, "CallBackBasicClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/pom.xml b/branches/sca-java-2.0-M4/itest/callback-complex-type/pom.xml deleted file mode 100644 index 3a4b60f7e0..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-callback-complex-type - Apache Tuscany SCA iTest Callback Complex Type - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java deleted file mode 100644 index 627d37e27d..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackCTypeCallBack { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java deleted file mode 100644 index 966ad17b9a..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CallBackCTypeClient { - - void run(); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java deleted file mode 100644 index d2dc0add75..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackCTypeClient.class) -public class CallBackCTypeClientImpl implements CallBackCTypeClient, CallBackCTypeCallBack { - - @Reference - protected CallBackCTypeService aCallBackService; - private static String returnMessage = null; - private static int callBackCount = 0; - private static Object monitor = new Object(); - - public CallBackCTypeClientImpl() { - } - - public void run() { - - // This test is the same as the Basic Callback except it uses a - // componentType side file. - // This test currently fails because the integration test environment - // does not properly copy - // the componentType files to the target folder. This is documented in - // Tuscany-967. - - // Test12a is the basic callback where the target calls back prior to - // returning to the client. - test12a(); - - // Test12b is where the target does not call back to the client. - test12b(); - - // Test12c is where the target calls back multiple times to the client. - test12c(); - - } - - private void test12a() { - aCallBackService.knockKnock("Knock Knock"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (returnMessage == null && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test12a -", "Who's There", this.getReturnMessage()); - - } - - private void test12b() { - aCallBackService.noCallBack("No Reply Desired"); - Assert.assertEquals("CallBackBasicITest - test12b -", 1, 1); - } - - private void test12c() { - aCallBackService.multiCallBack("Call me back 3 times"); - int count = 0; - - // - // If we can't get a response in 30 seconds consider this a failure - // - - synchronized (monitor) { - while (this.getCallBackCount() < 3 && count++ < 30) { - try { - monitor.wait(1000L); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - Assert.assertEquals("CallBackBasicITest - test12c -", 3, this.getCallBackCount()); - } - - public String getReturnMessage() { - return returnMessage; - } - - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - public int getCallBackCount() { - return callBackCount; - } - - public void incrementCallBackCount() { - callBackCount++; - } - - public void callBackMessage(String aString) { - System.out.println("Entering callback callBackMessage: " + aString); - synchronized (monitor) { - this.setReturnMessage(aString); - monitor.notify(); - } - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - synchronized (monitor) { - this.incrementCallBackCount(); - monitor.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java deleted file mode 100644 index 32ab1bdd3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackCTypeCallBack.class) -/** - * - */ -public interface CallBackCTypeService { - - void knockKnock(String aString); - - void noCallBack(String aString); - - void multiCallBack(String aString); - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java deleted file mode 100644 index f7a1a195ed..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackCTypeService.class) -public class CallBackCTypeServiceImpl implements CallBackCTypeService { - - @Callback - protected CallBackCTypeCallBack callback; - - public CallBackCTypeServiceImpl() { - } - - public void knockKnock(String aString) { - - System.out.println("CallBackCTypeServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - System.out.println("CallBackCTypeServiceImpl response sent"); - - } - - public void multiCallBack(String aString) { - - System.out.println("CallBackCTypeServiceImpl message received: " + aString); - callback.callBackIncrement("Who's There 1"); - System.out.println("CallBackCTypeServiceImpl response sent"); - callback.callBackIncrement("Who's There 2"); - System.out.println("CallBackCTypeServiceImpl response sent"); - callback.callBackIncrement("Who's There 3"); - System.out.println("CallBackCTypeServiceImpl response sent"); - - } - - public void noCallBack(String aString) { - - System.out.println("CallBackCTypeServiceImpl message received: " + aString); - System.out.println("CallBackCTypeServiceImpl No response desired"); - - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite deleted file mode 100644 index 2eea567fff..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType deleted file mode 100644 index af0b373472..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java b/branches/sca-java-2.0-M4/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java deleted file mode 100644 index dde489d766..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class CallBackCTypeTestCase { - - private Node node; - private CallBackCTypeClient aCallBackClient; - - @Test - public void testCallBackBasic() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallBackCTypeClient.composite"); - node = - NodeFactory.newInstance().createNode("CallBackCTypeClient.composite", new Contribution("c1", location)) - .start(); - - aCallBackClient = node.getService(CallBackCTypeClient.class, "CallBackCTypeClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/pom.xml b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/pom.xml deleted file mode 100644 index b70e05f622..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-callback-multiple-wires - Apache Tuscany SCA iTest Callback With Mutiple Wires - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java deleted file mode 100644 index 7c80d222fc..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.callback; - -/** - * The client interface - */ -public interface MyClient { - - void aClientMethod(); -} diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java deleted file mode 100644 index c3ea6c3032..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.callback; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Demonstrates a component-to-component callback invocation - */ -@Service(MyClient.class) -@Scope("COMPOSITE") -public class MyClientImpl1 implements MyClient, MyServiceCallback { - - private MyService myService; - static String result; - - @Reference - public void setMyService(MyService myService) { - this.myService = myService; - } - - public void aClientMethod() { - myService.someMethod("-> someMethod1"); - } - - public void receiveResult(String result) { - System.out.println("Work thread " + Thread.currentThread()); - System.out.println("Result in client1: " + result); - MyClientImpl1.result = result; - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java deleted file mode 100644 index 84ca158c97..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.callback; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Demonstrates a component-to-component callback invocation - */ -@Service(MyClient.class) -@Scope("COMPOSITE") -public class MyClientImpl2 implements MyClient, MyServiceCallback { - - private MyService myService; - static String result; - - @Reference - public void setMyService(MyService myService) { - this.myService = myService; - } - - public void aClientMethod() { - myService.someMethod("-> someMethod2"); - } - - public void receiveResult(String result) { - System.out.println("Work thread " + Thread.currentThread()); - System.out.println("Result in client2: " + result); - MyClientImpl2.result = result; - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java deleted file mode 100644 index 66758a1e73..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.callback; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.OneWay; - -/** - * This service that will be invoked in a non-blocking fashion - */ -@Callback(MyServiceCallback.class) -public interface MyService { - - @OneWay - void someMethod(String arg); -} diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java deleted file mode 100644 index f198efae51..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.callback; - -/** - * The callback interface for {@link MyService}. - */ -public interface MyServiceCallback { - - void receiveResult(String result); -} diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java deleted file mode 100644 index 49df5aa17a..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.callback; - -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements MyService and uses a callback. - */ -@Service(MyService.class) -@Scope("COMPOSITE") -public class MyServiceImpl implements MyService { - - @Context - protected RequestContext requestContext; - - public void someMethod(String arg) { - // invoke the callback - try { - MyServiceCallback myServiceCallback = requestContext.getCallback(); - myServiceCallback.receiveResult(arg + " -> receiveResult"); - } catch (RuntimeException e) { - System.out.println("RuntimeException invoking receiveResult: " + e.toString()); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite deleted file mode 100644 index 3d0b37eeae..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java b/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java deleted file mode 100644 index bd3cce74b4..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.callback; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * A TestCase that demonstrates resolving the client service and initiating the callback sequence - */ -public class CallbackMultiWireTestCase { - - private Node node; - private MyClient myClient1; - private MyClient myClient2; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallbackMultiWireTest.composite"); - node = NodeFactory.newInstance().createNode("CallbackMultiWireTest.composite", new Contribution("c1", location)); - node.start(); - myClient1 = node.getService(MyClient.class, "MyClientComponent1"); - myClient2 = node.getService(MyClient.class, "MyClientComponent2"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - - @Test - public void test() throws Exception { - System.out.println("Main thread " + Thread.currentThread()); - myClient1.aClientMethod(); - myClient2.aClientMethod(); - System.out.println("Sleeping ..."); - Thread.sleep(300); - assertEquals("-> someMethod1 -> receiveResult", MyClientImpl1.result); - assertEquals("-> someMethod2 -> receiveResult", MyClientImpl2.result); - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/pom.xml b/branches/sca-java-2.0-M4/itest/callback-separatethread/pom.xml deleted file mode 100644 index e88cecf530..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-callback-separatethread - Apache Tuscany SCA iTest Callback Using Separate Thread - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java b/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java deleted file mode 100644 index dc66003604..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the client interface for the call backs in a separate thread tests - */ -@Remotable -public interface CallBackSeparateThreadClient { - - /** - * This tests call back patterns using separate threads. - */ - void runTests(); -} diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java b/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java deleted file mode 100644 index f03144db8a..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.concurrent.atomic.AtomicInteger; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This is the client implementation for the call backs in a separate thread tests - */ -@Service(CallBackSeparateThreadClient.class) -public class CallBackSeparateThreadClientImpl implements CallBackSeparateThreadClient, EventProcessorCallBack { - /** - * Max time to wait to receive events. If not all the events are received then timeout. - */ - private static final int TIMEOUT = 30 * 1000; - - /** - * Counts the number of fast call backs. - */ - private static final AtomicInteger FAST_CALLBACK_COUNT = new AtomicInteger(); - - /** - * Counts the number of slow call backs. - */ - private static final AtomicInteger SLOW_CALLBACK_COUNT = new AtomicInteger(); - - /** - * This is our injected reference to the EventProcessorService - */ - @Reference - protected EventProcessorService aCallBackService; - - /** - * This tests call back patterns using separate threads. - */ - public void runTests() { - try { - // Register for fast call back - registerForFastCallback(); - - // Wait for a few fast call backs - System.out.println("Waiting for some fast call backs"); - waitForSomeFastCallbacks(); - - try { - // Register for slow call back - registerForSlowCallback(); - - // Wait for a few fast call backs - System.out.println("Waiting for some fast calls"); - waitForSomeFastCallbacks(); - - // Wait for a few slow call backs - System.out.println("Waiting for some slow calls"); - waitForSomeSlowCallbacks(); - } finally { - unregisterForSlowCallback(); - } - - System.out.println("Done"); - } finally { - unregisterForFastCallback(); - } - } - - /** - * Waits for some fast call backs to be fired - */ - private void waitForSomeFastCallbacks() { - // Reset the fast call back count - FAST_CALLBACK_COUNT.set(0); - - // Wait until we have 10 fast call backs or timeout occurs - final long start = System.currentTimeMillis(); - do { - if (FAST_CALLBACK_COUNT.get() >= 10) { - System.out.println("Received enough fast notifications"); - return; - } - - try { - Thread.sleep(5); - } catch (InterruptedException e) { - Assert.fail("Unexpeceted exception " + e); - } - } while (System.currentTimeMillis() - start < TIMEOUT); - - // If we get to here then we did not receive enough events - Assert.fail("Did not receive enough fast events"); - } - - /** - * Waits for some slow call backs to be fired - */ - private void waitForSomeSlowCallbacks() { - // Reset the slow call back count - SLOW_CALLBACK_COUNT.set(0); - - // Wait until we have 4 slow call backs or timeout - final long start = System.currentTimeMillis(); - do { - if (SLOW_CALLBACK_COUNT.get() >= 4) { - System.out.println("Received enough slow notifications"); - return; - } - - try { - Thread.sleep(5); - } catch (InterruptedException e) { - Assert.fail("Unexpeceted exception " + e); - } - } while (System.currentTimeMillis() - start < TIMEOUT); - - // If we get to here then we did not receive enough events - Assert.fail("Did not receive enough slow events"); - } - - /** - * Register to receive fast call backs - */ - private void registerForFastCallback() { - aCallBackService.registerForEvent("FAST"); - } - - /** - * Register to receive slow call backs - */ - private void registerForSlowCallback() { - aCallBackService.registerForEvent("SLOW"); - } - - /** - * Unregister to receive fast call backs - */ - private void unregisterForFastCallback() { - aCallBackService.unregisterForEvent("FAST"); - } - - /** - * Unregister to receive slow call backs - */ - private void unregisterForSlowCallback() { - aCallBackService.unregisterForEvent("SLOW"); - } - - /** - * Method that is called when an Event is delivered. - * - * @param aEventName The name of the Event - * @param aEventData The Event data - */ - public void eventNotification(String aEventName, Object aEventData) { - // System.out.println("Received Event : " + aEventName + " " + aEventData); - - if (aEventName.equals("FAST")) { - final int newValue = FAST_CALLBACK_COUNT.incrementAndGet(); - //System.out.println("Received total of " + newValue + " fast call backs"); - } else if (aEventName.equals("SLOW")) { - final int newValue = SLOW_CALLBACK_COUNT.incrementAndGet(); - //System.out.println("Received total of " + newValue + " slow call backs"); - } else { - System.out.println("Unknown event type of " + aEventName); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java b/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java deleted file mode 100644 index 137ea6a658..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The call back interface for the EventProcessorService that is implemented - * by the client to receive event notifications - */ -@Remotable -public interface EventProcessorCallBack { - /** - * Call back notifying client of an Event - * - * @param aEventName The name of the Event - * @param aEventData The data for the Event - */ - void eventNotification(String aEventName, Object aEventData); -} diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java b/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java deleted file mode 100644 index 4bf05fc925..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -/** - * Sample Event Processor Service - */ -@Callback(EventProcessorCallBack.class) -@Remotable -public interface EventProcessorService { - - /** - * Registers the client to receive notifications for the specified event - * - * @param aEventName The name of the Event to register - */ - void registerForEvent(String aEventName); - - /** - * Unregisters the client so it no longer receives notifications for the specified event - * - * @param aEventName The name of the Event to unregister - */ - void unregisterForEvent(String aEventName); -} diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java b/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java deleted file mode 100644 index bec98a49c9..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.Map; -import java.util.Timer; -import java.util.TimerTask; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Sample Event Processor Service Implementation - */ -@Service(EventProcessorService.class) -@Scope("COMPOSITE") -public class EventProcessorServiceImpl implements EventProcessorService { - - /** - * Reference to the call back - */ - @Callback - protected ServiceReference clientCallback; - - /** - * This map contains the call backs for each of the registered Event names - */ - private final Map> eventListeners; - - /** - * The list of all Event Generators we create - */ - private final EventGenerator[] allEventGenerators; - - /** - * Constructor. Starts the Event Generators - */ - public EventProcessorServiceImpl() { - eventListeners = new ConcurrentHashMap>(); - - // We will simulate an Event generator - allEventGenerators = new EventGenerator[2]; - allEventGenerators[0] = new EventGenerator("FAST", 10); // Generate the FAST event every 10ms - allEventGenerators[1] = new EventGenerator("SLOW", 50); // Generate the SLOW event every 50ms - } - - /** - * Registers the client to receive notifications for the specified event - * - * @param aEventName The name of the Event to register - */ - public void registerForEvent(String aEventName) { - // Register for the Event - eventListeners.put(aEventName, clientCallback); - - // Send the "register" started event to the client - receiveEvent(aEventName, "SameThread: Registered to receive notifications for " + aEventName); - } - - /** - * Unregisters the client so it no longer receives notifications for the specified event - * - * @param aEventName The name of the Event to unregister - */ - public void unregisterForEvent(String aEventName) { - // Send the "register" started event to the client - receiveEvent(aEventName, "SameThread: Unregister from receiving notifications for " + aEventName); - - eventListeners.remove(aEventName); - } - - /** - * This method is called whenever the EventProcessorService receives an Event - * - * @param aEventName The name of the Event received - * @param aEventData The Event data - */ - private void receiveEvent(String aEventName, Object aEventData) { - // Get the listener for the Event - final ServiceReference callback = eventListeners.get(aEventName); - if (callback == null) { - //System.out.println("No registered listeners for " + aEventName); - return; - } - - // Trigger the call back - // System.out.println("Notifying " + callback + " of event " + aEventName); - callback.getService().eventNotification(aEventName, aEventData); - // System.out.println("Done notify " + callback + " of event " + aEventName); - } - - /** - * Shuts down the Event Processor - */ - @Destroy - public void shutdown() { - System.out.println("Shutting down the EventProcessor"); - - // Clear list of call back locations as we don't want to send any more notifications - eventListeners.clear(); - - // Stop the Event Generators - for (EventGenerator generator : allEventGenerators) { - generator.stop(); - } - } - - /** - * Utility class for generating Events - */ - private final class EventGenerator { - /** - * The Timer we are using to generate the events - */ - private final Timer timer = new Timer(); - - /** - * Lock object to ensure that we can cancel the timer cleanly. - */ - private final Object lock = new Object(); - - /** - * Constructor - * - * @param aEventName The name of the Event to generate - * @param frequencyInMilliseconds How frequently we should generate the Events - */ - private EventGenerator(String aEventName, int frequencyInMilliseconds) { - timer.schedule(new EventGeneratorTimerTask(aEventName), - frequencyInMilliseconds, - frequencyInMilliseconds); - } - - /** - * Stop this Event Generator - */ - private void stop() { - synchronized (lock) { - timer.cancel(); - } - } - - /** - * The TimerTask that is invoked by the Timer for the EventGenerator - */ - private final class EventGeneratorTimerTask extends TimerTask { - /** - * The name of the Event we should generate - */ - private final String eventName; - - /** - * Constructor - * - * @param aEventName The name of the Event we should generate - */ - private EventGeneratorTimerTask(String aEventName) { - eventName = aEventName; - } - - /** - * Timer calls this method and it will generate an Event - */ - - public void run() { - synchronized(lock) { - // System.out.println("Generating new event " + eventName); - receiveEvent(eventName, "Separate Thread Notification: " + UUID.randomUUID().toString()); - } - } - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite b/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite deleted file mode 100644 index f803fb2ec9..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java b/branches/sca-java-2.0-M4/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java deleted file mode 100644 index c216cab1be..0000000000 --- a/branches/sca-java-2.0-M4/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This test case will attempt to trigger a call back using a separate thread - */ -public class CallBackSeparateThreadTestCase { - - /** - * The Node we are using - */ - private Node node; - - /** - * The client the tests should use - */ - private CallBackSeparateThreadClient aCallBackClient; - - /** - * Run the call back in separate thread tests - */ - @Test - public void testCallBackSeparateThread() { - aCallBackClient.runTests(); - } - - /** - * Load the Call back in separate thread composite and look up the client. - */ - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallBackSeparateThreadTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackSeparateThreadTest.composite", new Contribution("c1", location)); - node.start(); - aCallBackClient = node.getService(CallBackSeparateThreadClient.class, "CallBackSeparateThreadClient"); - } - - /** - * Shutdown the SCA node - */ - - @After - public void tearDown() throws Exception { - node.stop(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/pom.xml b/branches/sca-java-2.0-M4/itest/component-type/pom.xml deleted file mode 100644 index ea829d874b..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-component-type - Apache Tuscany SCA iTest Component Type - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddService.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 8b6fe066a6..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - return n1 + n2; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorClient.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 6f978bd9be..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - String location = ContributionLocationHelper.getContributionLocation("Calculator.composite"); - Node node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location)); - node.start(); - - CalculatorService calculatorService = - node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService"); - - // Calculate - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorService.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The Calculator service interface. - */ -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 1209ac128a..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - public void setAddService(AddService addService) { - this.addService = addService; - } - - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideService.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index f7ac0b7287..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - return n1 / n2; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyService.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index b7dca792b2..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - return n1 * n2; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractService.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 77b128ab8d..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - return n1 - n2; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/Calculator.composite b/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/Calculator.composite deleted file mode 100644 index ecee33e072..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType b/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType deleted file mode 100644 index 78e169deb4..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType b/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType deleted file mode 100644 index 5d66becedf..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType b/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType deleted file mode 100644 index 22236ae0d0..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType b/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType deleted file mode 100644 index 2035d617e5..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType b/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType deleted file mode 100644 index fe76f553be..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/component-type/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-java-2.0-M4/itest/component-type/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index ac3ccc3d08..0000000000 --- a/branches/sca-java-2.0-M4/itest/component-type/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the Calculator service component. - */ -public class CalculatorTestCase { - - private CalculatorService calculatorService; - private Node node; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("Calculator.composite"); - node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location)); - node.start(); - calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testCalculator() throws Exception { - // Calculate - /* - assertEquals(calculatorService.add(3, 2), 5.0, 0.0); - assertEquals(calculatorService.subtract(3, 2), 1.0, 0.0); - assertEquals(calculatorService.multiply(3, 2), 6.0, 0.0); - assertEquals(calculatorService.divide(3, 2), 1.5, 0.0); - */ - } -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-folder/pom.xml deleted file mode 100644 index 05cabb9b90..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-folder/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-contribution-folder - Apache Tuscany SCA iTest Contribution Folder - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/calculator/CalculatorService.java b/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/calculator/CalculatorService.java deleted file mode 100644 index b4c677b371..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/calculator/CalculatorService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -public interface CalculatorService { - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java b/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java deleted file mode 100644 index ef2a43c766..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import calculator.CalculatorService; - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev$ $Date$ - */ -public class ContributionFolderTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(new Contribution("foo", "src/test/resources/repository")); - node.start(); - } - - public void testInvoke() throws Exception { - CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - assertEquals(3.0, service.add(1, 2)); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite b/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite deleted file mode 100644 index f67b212d99..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml deleted file mode 100644 index 27a1ee74e4..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar b/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar deleted file mode 100644 index fe264693fe..0000000000 Binary files a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar and /dev/null differ diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar b/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar deleted file mode 100644 index d5dfb647d3..0000000000 Binary files a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar and /dev/null differ diff --git a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository3/contribution.zip b/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository3/contribution.zip deleted file mode 100644 index b293aa4bcc..0000000000 Binary files a/branches/sca-java-2.0-M4/itest/contribution-folder/src/test/resources/repository3/contribution.zip and /dev/null differ diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/pom.xml deleted file mode 100644 index 1ab420e93c..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-export-composite - Apache Tuscany SCA iTest Contribution Export - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java deleted file mode 100644 index 669821261c..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 hello; - -import org.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the Hello service. - */ -@Remotable -public interface Hello { - - public String getGreetings(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java deleted file mode 100644 index ff9f6e75f3..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 hello; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(Hello.class) -public class HelloImpl implements Hello { - - public String getGreetings(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index bea6f39932..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/hello.composite b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/hello.composite deleted file mode 100644 index aeeab337fa..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/main/resources/hello.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java deleted file mode 100644 index 44614f243a..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.contribution; - -import hello.Hello; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - - @Override - protected void setUp() throws Exception { - // Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - // Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - URL helloURL = getContributionURL(Hello.class); - - // File helloContrib = new File("./target/classes/"); - // URL helloURL = helloContrib.toURL(); - Contribution consumerContribution = - contributionService.contribute("http://import-export/hello", helloURL, false); - Composite consumerComposite = consumerContribution.getDeployables().get(0); - domain.getDomainComposite().getIncludes().add(consumerComposite); - domain.buildComposite(consumerComposite); - - // Start Components from my composite - domain.getCompositeActivator().activate(consumerComposite); - domain.getCompositeActivator().start(consumerComposite); - } - - private URL getContributionURL(Class cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - public void testHello() throws IOException { - Hello hello = domain.getService(Hello.class, "HelloServiceComponent"); - assertNotNull(hello); - assertEquals(hello.getGreetings("lresende"), "Hello lresende"); - } - - @Override - public void tearDown() throws Exception { - domain.close(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/pom.xml deleted file mode 100644 index cca05b9bb9..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-export-java - Apache Tuscany SCA iTest Contribution Java Export - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7e11adcec7..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType deleted file mode 100644 index 5a14b41650..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/pom.xml deleted file mode 100644 index d8133c4acc..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-export-resource - Apache Tuscany SCA iTest Contribution Resource Export - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f11eacb416..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html deleted file mode 100644 index 1ff281373a..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html +++ /dev/null @@ -1,27 +0,0 @@ - - - -Store - - - -

Sample Store Page

- - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/pom.xml deleted file mode 100644 index 7c504aee50..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/pom.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-export-wsdl - Apache Tuscany SCA iTest Contribution WSDL Export - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 8254b667f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl deleted file mode 100644 index 0172fb2c7c..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd b/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd deleted file mode 100644 index d49e2ead99..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/pom.xml deleted file mode 100644 index 40dab26baa..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-import-composite - Apache Tuscany SCA iTest Contribution Import - - - - org.apache.tuscany.sca - itest-contribution-export-composite - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index c062afaed0..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 hello.Hello; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldImpl implements HelloWorldService { - @Reference - protected Hello helloServiceRef; - - public String getGreetings(String name) { - return helloServiceRef.getGreetings(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index e03ed4dc25..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - public static void main(String[] args) { - - SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("HelloWorld server stopped"); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 130aa91093..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl deleted file mode 100644 index 0172fb2c7c..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd deleted file mode 100644 index d49e2ead99..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite deleted file mode 100644 index 44ceba1240..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 3cc6784eca..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.contribution; - -import hello.Hello; -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution helloWorldContribution; - private Contribution compositeContribution; - - @Override - protected void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - // File compositeContribLocation = new File("../export-composite/target/classes"); - // URL compositeContribURL = compositeContribLocation.toURL(); - URL compositeContribURL = getContributionURL(Hello.class); - compositeContribution = - contributionService.contribute("http://import-export/export-composite", compositeContribURL, false); - for (Composite deployable : compositeContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - -// File helloWorldContribLocation = new File("./target/classes/"); -// URL helloWorldContribURL = helloWorldContribLocation.toURL(); - URL helloWorldContribURL = getContributionURL(HelloWorldService.class); - helloWorldContribution = - contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - private URL getContributionURL(Class cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/helloworld"); - contributionService.remove("http://import-export/export-composite"); - - //Stop Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - domain.close(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/pom.xml deleted file mode 100644 index 91eb35d6c1..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-import-java - Apache Tuscany SCA iTest Contribution Java Import - - - - org.apache.tuscany.sca - itest-contribution-export-java - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.osoa.sca.annotations.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/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 224e2c4d79..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite deleted file mode 100644 index a53117e72f..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 9bc94525e0..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.contribution; - -import helloworld.HelloWorldImpl; -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution helloWorldContribution; - private Contribution javaContribution; - - @Override - protected void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - //File javaContribLocation = new File("../export-java/target/classes"); - //URL javaContribURL = javaContribLocation.toURL(); - URL javaContribURL = getContributionURL(HelloWorldService.class); - javaContribution = contributionService.contribute("http://import-export/export-java", javaContribURL, false); - for (Composite deployable : javaContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - //File helloWorldContribLocation = new File("./target/classes/"); - //URL helloWorldContribURL = helloWorldContribLocation.toURL(); - URL helloWorldContribURL = getContributionURL(HelloWorldImpl.class); - helloWorldContribution = contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - private URL getContributionURL(Class cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - public void testPing() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - assertEquals("Hello test", helloWorldService.getGreetings("test")); - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/helloworld"); - contributionService.remove("http://import-export/export-java"); - - // Stop Components from my composite - for (Composite deployable : helloWorldContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/pom.xml deleted file mode 100644 index 0696df1951..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-import-resource - Apache Tuscany SCA iTest Contribution Resource Import - - - - - org.apache.tuscany.sca - itest-contribution-export-resource - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-http - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.6-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-contribution-resource - 1.6-SNAPSHOT - test - - - - javax.servlet - servlet-api - 2.5 - provided - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index ac6d7becb3..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/store.composite b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/store.composite deleted file mode 100644 index bb5a7b764f..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/main/resources/store.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java deleted file mode 100644 index 1b7542b7d9..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.contribution; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class StoreTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution storeContribution; - private Contribution resourceContribution; - - @Override - protected void setUp() throws Exception { - //Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - URL javaContribURL = getContributionURL(cl, "ufservices/store.html"); - resourceContribution = contributionService.contribute("http://import-export/export-resource", javaContribURL, false); - for (Composite deployable : resourceContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - URL storeContributionURL = getContributionURL(cl, "store.composite"); - - storeContribution = - contributionService.contribute("http://import-export/store", storeContributionURL, false); - for (Composite deployable : storeContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : storeContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/store"); - contributionService.remove("http://import-export/export-resource"); - - // Stop Components from my composite - for (Composite deployable : storeContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - } - - - /** - * Utility methods - */ - - - private URL getContributionURL(ClassLoader cl, Class cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cl.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - private URL getContributionURL(ClassLoader cl, String uri) throws MalformedURLException { - URL url = cl.getResource(uri); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - uri.length()); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/pom.xml deleted file mode 100644 index 3d8b5e85c3..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-import-wsdl - Apache Tuscany SCA iTest Contribution WSDL Import - - - - org.apache.tuscany.sca - itest-contribution-export-wsdl - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.6-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.6-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 0de3c70303..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.osoa.sca.annotations.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/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java deleted file mode 100644 index e03ed4dc25..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to create an SCA runtime, and start it which - * activates the helloworld Web service endpoint. - */ -public class HelloWorldServer { - - public static void main(String[] args) { - - SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite"); - - try { - System.out.println("HelloWorld server started (press enter to shutdown)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("HelloWorld server stopped"); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index 268d90e910..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.osoa.sca.annotations.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetings(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a47b9a71e9..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite deleted file mode 100644 index 76ccf71fb8..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java deleted file mode 100644 index 66227eacaa..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.contribution; - -import helloworld.HelloWorldService; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.contribution.service.ContributionService; -import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; - -/** - * Tests that the helloworld server is available - */ -public class HelloWorldServerTestCase extends TestCase { - private ClassLoader cl; - private EmbeddedSCADomain domain; - private Contribution wsdlContribution; - private Contribution consumerContribution; - - @Override - protected void setUp() throws Exception { - // Create a test embedded SCA domain - cl = getClass().getClassLoader(); - domain = new EmbeddedSCADomain(cl, "http://localhost"); - - //Start the domain - domain.start(); - - // Contribute the SCA contribution - ContributionService contributionService = domain.getContributionService(); - - // File wsdlContribLocation = new File("../export-wsdl/target/classes"); - // URL wsdlContribURL = wsdlContribLocation.toURL(); - URL wsdlContribURL = getContributionURL(getClass().getClassLoader(), "helloworld.wsdl"); - wsdlContribution = contributionService.contribute("http://import-export/export-wsdl", wsdlContribURL, false); - for (Composite deployable : wsdlContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // File helloWorldContribLocation = new File("./target/classes/"); - // URL helloWorldContribURL = helloWorldContribLocation.toURL(); - URL helloWorldContribURL = getContributionURL(HelloWorldService.class); - consumerContribution = - contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); - for (Composite deployable : consumerContribution.getDeployables()) { - domain.getDomainComposite().getIncludes().add(deployable); - domain.buildComposite(deployable); - } - - // Start Components from my composite - for (Composite deployable : consumerContribution.getDeployables()) { - domain.getCompositeActivator().activate(deployable); - domain.getCompositeActivator().start(deployable); - } - } - - public void testPing() throws IOException { - new Socket("127.0.0.1", 8085); - } - - private URL getContributionURL(Class cls) throws MalformedURLException { - String flag = "/" + cls.getName().replace('.', '/') + ".class"; - URL url = cls.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length() + 1); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - return url; - } - - private URL getContributionURL(ClassLoader cl, String flag) throws MalformedURLException { - URL url = cl.getResource(flag); - String root = url.toExternalForm(); - root = root.substring(0, root.length() - flag.length()); - if (root.startsWith("jar:") && root.endsWith("!/")) { - root = root.substring(4, root.length() - 2); - } - url = new URL(root); - // System.out.println(url); - return url; - } - - public void testServiceCall() throws IOException { - HelloWorldService helloWorldService = - domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService"); - assertNotNull(helloWorldService); - - assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); - } - - @Override - public void tearDown() throws Exception { - ContributionService contributionService = domain.getContributionService(); - - // Remove the contribution from the in-memory repository - contributionService.remove("http://import-export/helloworld"); - contributionService.remove("http://import-export/export-wsdl"); - - // Stop Components from my composite - for (Composite deployable : consumerContribution.getDeployables()) { - domain.getCompositeActivator().stop(deployable); - domain.getCompositeActivator().deactivate(deployable); - } - - domain.stop(); - - domain.close(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-import-export/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-import-export/pom.xml deleted file mode 100644 index e64ff002e1..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-import-export/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 1.6-SNAPSHOT - ../pom.xml - - itest-contribution-import-export - pom - Apache Tuscany SCA Contribution Import/Export Integration Tests - - - export-composite - export-java - export-resource - export-wsdl - import-composite - import-java - import-resource - import-wsdl - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.6-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-contribution-impl - 1.6-SNAPSHOT - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-zip/pom.xml b/branches/sca-java-2.0-M4/itest/contribution-zip/pom.xml deleted file mode 100644 index c637d685ac..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-zip/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-contribution-zip - Apache Tuscany SCA iTest Contribution ZIP - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - diff --git a/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/calculator/CalculatorService.java b/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/calculator/CalculatorService.java deleted file mode 100644 index b4c677b371..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/calculator/CalculatorService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -public interface CalculatorService { - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java b/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java deleted file mode 100644 index 303e2a6d9a..0000000000 --- a/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.contribution.zip; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import calculator.CalculatorService; - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev$ $Date$ - */ -public class ContributionZIPTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = - NodeFactory.newInstance().createNode(new Contribution("foo", - "src/test/resources/repository/contribution.zip")); - node.start(); - } - - public void testInvoke() throws Exception { - CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - assertEquals(3.0, service.add(1, 2)); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/resources/repository/contribution.zip b/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/resources/repository/contribution.zip deleted file mode 100644 index 3239ae1242..0000000000 Binary files a/branches/sca-java-2.0-M4/itest/contribution-zip/src/test/resources/repository/contribution.zip and /dev/null differ diff --git a/branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/build.xml b/branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/build.xml deleted file mode 100644 index 68e15d4a8b..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/build.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/pom.xml deleted file mode 100644 index 3f22b55dea..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/bin-distro-unzip/pom.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-bin-distro-unzip - Apache Tuscany SCA iTest Bin Distro Unzip - - - - org.apache.tuscany.sca - tuscany-distribution-all - pom - 2.0-M4-SNAPSHOT - - - - - - - - not-sun-jdk - - - ${java.home}/../lib/tools.jar - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - - - run-samples - verify - - run - - - - - - - - - - - - - - - - - sun-jdk - - - ${java.home}/../lib/tools.jar - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - sun.jdk - tools - 1.6 - system - ${java.home}/../lib/tools.jar - - - - - - run-samples - verify - - run - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/build.xml b/branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/build.xml deleted file mode 100644 index ed22bce2dc..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ${java.home} - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/pom.xml deleted file mode 100644 index 71e83d01af..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/binding-ws-calculator/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-binding-ws-calculator - Apache Tuscany SCA iTest Distribution binding-ws-calculator - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - sun.jdk - tools - 1.6 - system - ${java.home}/../lib/tools.jar - - - - - - run-samples - verify - - run - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/build.xml b/branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/build.xml deleted file mode 100644 index 25abf4e040..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/pom.xml deleted file mode 100644 index f923ecfb15..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/calculator-rmi/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-calculator-rmi - Apache Tuscany SCA iTest Distribution calculator-rmi - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - sun.jdk - tools - 1.6 - system - ${java.home}/../lib/tools.jar - - - - - - run-samples - verify - - run - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/build.xml b/branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/build.xml deleted file mode 100644 index 106fee758c..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ${java.home} - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/pom.xml deleted file mode 100644 index 5d5688af02..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/implementation-java-calculator/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-implementation-java-calculator - Apache Tuscany SCA iTest Distribution implementation-java-calculator - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - sun.jdk - tools - 1.6 - system - ${java.home}/../lib/tools.jar - - - - - - run-samples - verify - - run - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/legal-checks/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/legal-checks/pom.xml deleted file mode 100644 index 79d3974cee..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/legal-checks/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-legal-checks - Apache Tuscany SCA iTest Distribution Legal Checks - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java b/branches/sca-java-2.0-M4/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java deleted file mode 100644 index 2cbbe57125..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -import org.junit.Test; - -/** - * Checks that all jar files included in the distribution are mentioned in the LICENSE file - * and that all jars mentioned in the LICENSE are in the distribution. - */ -public class JarsInLICENSETestCase { - - @Test - public void testJars() throws Exception { - File distroRoot = getUnzipedDistroRoot(); - - File licenseFile = new File(distroRoot, "LICENSE"); - if (!licenseFile.exists()) { - throw new IllegalStateException("can't find LICENSE file at: " + licenseFile.getAbsoluteFile().toString()); - } - - File libDirectory = new File(distroRoot, "modules"); - if (!libDirectory.exists()) { - throw new IllegalStateException("can't find modules folder at: " + libDirectory.getAbsoluteFile().toString()); - } - - List jars = getJarsInDistro(libDirectory); - - List bad2 = getLICENSEJarsNotInDistro(licenseFile, jars); - if (bad2.size() > 0) { - System.err.println("Jars in LICENSE but not in Distribution: " + bad2); - } - - List bad1 = getJarsNotInLICENSE(jars, licenseFile); - if (bad1.size() > 0) { - System.err.println("Jars in distribution but not in LICENSE: " + bad1); - } - - if (bad1.size() > 0 || bad2.size() > 0) { - throw new IllegalStateException("LICENSE problems, check log"); - } - } - - private List getLICENSEJarsNotInDistro(File licenseFile, List jars) throws IOException { - List badJars = new ArrayList(); - BufferedReader reader = new BufferedReader(new FileReader(licenseFile)); - String line = null; - while ((line = reader.readLine()) != null) { - line = line.trim(); - if (line.contains(".jar")) { - StringTokenizer st = new StringTokenizer(line); - while (st.hasMoreTokens()) { - String s = st.nextToken(); - if (s.contains(".jar")) { - if (s.startsWith("(")) { - s = s.substring(1); - } - if (s.endsWith(",") || s.endsWith(":")) { - s = s.substring(0, s.length()-1); - } - if (s.endsWith(")")) { - s = s.substring(0, s.length()-1); - } - if (!jars.contains(s) && !s.startsWith("tuscany-")) { - badJars.add(s); - } - } - } - } - } - return badJars; - } - - private List getJarsNotInLICENSE(List jars, File licenseFile) throws IOException { - List badJars = new ArrayList(); - String licenseText = readLICENSE(licenseFile); - for (String jar : jars) { - if (!licenseText.contains(jar)) { - if (jar.startsWith("tuscany-")) { - // ignore tuscany jars as they're not mentioned in the LICENSE file - } else { - badJars.add(jar); - } - } - } - return badJars; - } - - private List getJarsInDistro(File directory) { - List jars = new ArrayList(); - for (String fn : directory.list()){ - if (fn.endsWith(".jar")) { - jars.add(fn); - } else { - File f = new File(directory, fn); - if (f.isDirectory()) { - jars.addAll(getJarsInDistro(f)); - } - } - } - return jars; - } - - private File getUnzipedDistroRoot() { - File distroTarget = new File("../../../distribution/all/target"); - File root = null; - for (String f : distroTarget.list()) { - if (f.endsWith("-dir")) { - root = new File(distroTarget, f); - break; - } - } - if (root == null) { - throw new IllegalStateException("can't find distro root"); - } - if (root.list().length != 1) { - throw new IllegalStateException("expecting one directory in distro root"); - } - root = new File(root, root.list()[0]); - return root; - } - - private static String readLICENSE(File licenseFile) throws java.io.IOException { - StringBuffer fileData = new StringBuffer(); - BufferedReader reader = new BufferedReader(new FileReader(licenseFile)); - char[] buf = new char[1024]; - int numRead = 0; - while ((numRead = reader.read(buf)) != -1) { - String readData = String.valueOf(buf, 0, numRead); - fileData.append(readData); - buf = new char[1024]; - } - reader.close(); - return fileData.toString(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/distribution/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/pom.xml deleted file mode 100644 index 0dd9527c47..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - pom - itest-distribution - Apache Tuscany SCA iTest Distribution - - - install - - - - bin-distro-unzip - binding-ws-calculator - calculator-rmi - implementation-java-calculator - legal-checks - webapp-helloworld - webapp-helloworld-bpel - webapp-helloworld-js-client - webapp-helloworld-jsp - webapp-helloworld-stripes - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/pom.xml deleted file mode 100644 index c748cf771b..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-bpel - Apache Tuscany SCA iTest Distribution Webapp helloworld-bpel - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-bpel - war - 2.0-M4-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-bpel - - - - org.apache.tuscany.sca - helloworld-bpel - war - - helloworld-bpel - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 5b29292acf..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-bpel"); - Iterator ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/pom.xml deleted file mode 100644 index f209a4fcd8..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/pom.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-jms - Apache Tuscany SCA iTest Distribution Webapp helloworld-jms - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-jms - war - 2.0-M4-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - org.mortbay.jetty - jsp-2.0 - 6.1.19 - pom - compile - - - org.mortbay.jetty - jetty-naming - 6.1.19 - - - org.mortbay.jetty - jetty-plus - 6.1.19 - - - geronimo-spec - geronimo-spec-jta - 1.0.1B-rc4 - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - - jetty6x - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - - embedded - - - - org.mortbay.jetty - jetty - - - org.mortbay.jetty - jetty-util - - - org.mortbay.jetty - jetty-plus - - - org.mortbay.jetty - jetty-naming - - - geronimo-spec - geronimo-spec-jta - - - javax.servlet - servlet-api - - - org.mortbay.jetty - jsp-2.0 - - - tomcat - jasper-runtime - - - tomcat - jasper-compiler - - - commons-logging - commons-logging - - - tomcat - jasper-compiler-jdt - - - org.mortbay.jetty - jsp-api-2.0 - - - commons-el - commons-el - - - - - - - - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jms - - - - org.apache.tuscany.sca - helloworld-jms - war - - helloworld-jms - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index bc436667c8..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jms/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jms"); - Iterator ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/pom.xml deleted file mode 100644 index 8649b9354c..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-js-client - Apache Tuscany SCA iTest Distribution Webapp helloworld-js-client - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-js-client - war - 2.0-M4-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - org.mortbay.jetty - jsp-2.0 - 6.1.19 - pom - compile - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - - latest-jetty6x - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - - embedded - - - - org.mortbay.jetty - jetty - - - org.mortbay.jetty - jetty-util - - - javax.servlet - servlet-api - - - org.mortbay.jetty - jsp-2.0 - - - tomcat - jasper-runtime - - - tomcat - jasper-compiler - - - commons-logging - commons-logging - - - tomcat - jasper-compiler-jdt - - - org.mortbay.jetty - jsp-api-2.0 - - - commons-el - commons-el - - - - - - - - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jsp - - - - org.apache.tuscany.sca - helloworld-js-client - war - - helloworld-js-client - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 099b442050..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-js-client/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.assertTrue; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; - -import org.junit.Test; - -/** - * Verfiy the serverside code is working, not sure how to easily itest the browser javascript code - */ -public class HelloworldTestCase { - - @Test - public void testA() throws MalformedURLException, IOException { - - URL url = new URL("http://localhost:8085/helloworld-js-client/org.oasisopen.sca.componentContext.js/foo/call/plaincall/service.sayHello.dwr"); - URLConnection conn = url.openConnection(); - conn.setDoOutput(true); - OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); - - // to find this run the sample through TCPMON to capture the messages - - String data = URLEncoder.encode("callCount", "UTF-8") + "=" + URLEncoder.encode("1", "UTF-8"); - data += "&" + URLEncoder.encode("page", "UTF-8") + "=" + URLEncoder.encode("/helloworld-js-client/", "UTF-8"); - data += "&" + URLEncoder.encode("httpSessionId", "UTF-8") + "=" + URLEncoder.encode("", "UTF-8"); - data += "&" + URLEncoder.encode("scriptSessionId", "UTF-8") + "=" + URLEncoder.encode("A023DA664E56F075491BE1B87B37B02671", "UTF-8"); - data += "&" + URLEncoder.encode("c0-scriptName", "UTF-8") + "=" + URLEncoder.encode("service", "UTF-8"); - data += "&" + URLEncoder.encode("c0-methodName", "UTF-8") + "=" + URLEncoder.encode("sayHello", "UTF-8"); - data += "&" + URLEncoder.encode("c0-id", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8"); - data += "&" + URLEncoder.encode("c0-param0", "UTF-8") + "=" + URLEncoder.encode("string:petra", "UTF-8"); - data += "&" + URLEncoder.encode("batchId", "UTF-8") + "=" + URLEncoder.encode("0", "UTF-8"); - - wr.write(data); - wr.flush(); - - BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); - rd.readLine(); // throw 'allowScriptTagRemoting is false.'; - rd.readLine(); //#DWR-INSERT - rd.readLine(); //#DWR-REPLY - String line = rd.readLine(); // dwr.engine._remoteHandleCallback('0','0',"Hello petra"); - wr.close(); - rd.close(); - - assertTrue(line.endsWith("\"Hello petra\");")); - - } - -} diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/pom.xml deleted file mode 100644 index 36e71d4a88..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/pom.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-jsf - Apache Tuscany SCA iTest Distribution Webapp helloworld-jsf - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-jsf - war - 2.0-M4-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - javax.el - el-api - 1.0 - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jsf - - - - org.apache.tuscany.sca - helloworld-jsf - war - - helloworld-jsf - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java deleted file mode 100644 index 1f90a772ac..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsf/src/test/java/itest/HelloworldTestCaseFIXME.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlInput; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - * TODO: This doesn't work yet, I can't find the hello response in the - * the response page from the button click. Not sure if thats just - * looking in the wrong place or the button click is not working - * Also the Cargo maven plugin has a problem finding the el-api when using Jetty - */ -public class HelloworldTestCaseFIXME { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jsf"); - - HtmlForm form = page.getFormByName("mainForm"); - - HtmlInput textField = form.getInputByName("mainForm:name"); - textField.setValueAttribute("root"); - - Iterator i = form.getChildIterator(); - i.next(); - HtmlInput button = (HtmlInput)i.next(); - - HtmlPage page2 = (HtmlPage)button.click(); - - Iterator ss = page2.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - ss.next(); - HtmlForm form2 = (HtmlForm)ss.next(); - - Object oow = form2.getFirstChild(); - System.out.println(oow); -// assertTrue(p.asText().startsWith("Hello Petra")); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/pom.xml deleted file mode 100644 index 62546a57a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-jsp - Apache Tuscany SCA iTest Distribution Webapp helloworld-jsp - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-jsp - war - 2.0-M4-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - org.mortbay.jetty - jsp-2.0 - 6.1.19 - pom - compile - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - - latest-jetty6x - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer - - embedded - - - - org.mortbay.jetty - jetty - - - org.mortbay.jetty - jetty-util - - - javax.servlet - servlet-api - - - org.mortbay.jetty - jsp-2.0 - - - tomcat - jasper-runtime - - - tomcat - jasper-compiler - - - commons-logging - commons-logging - - - tomcat - jasper-compiler-jdt - - - org.mortbay.jetty - jsp-api-2.0 - - - commons-el - commons-el - - - - - - - - org.codehaus.cargo.container.jetty.Jetty6xEmbeddedStandaloneLocalConfiguration - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-jsp - - - - org.apache.tuscany.sca - helloworld-jsp - war - - helloworld-jsp - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 2be60be081..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-jsp"); - Iterator ss = page.getAllHtmlChildElements(); - ss.next(); - ss.next(); - ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("Hello world", p.asText()); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/pom.xml deleted file mode 100644 index a856894f4c..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld-stripes - Apache Tuscany SCA iTest Distribution Webapp helloworld-stripes - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld-stripes - war - 2.0-M4-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - htmlunit - htmlunit - 1.9 - test - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - compile - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - helloworld-stripes - - - - org.apache.tuscany.sca - helloworld-stripes - war - - helloworld-stripes - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 743ab054c8..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-stripes"); - Iterator ss = page.getAllHtmlChildElements(); - Object o1= ss.next(); - Object o2= ss.next(); - Object o3= ss.next(); - Object o4= ss.next(); - Object o5= ss.next(); - Object o6= ss.next(); - HtmlParagraph p = (HtmlParagraph)ss.next(); - assertEquals("sayHello returns: Hello world", p.asText()); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld/pom.xml b/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld/pom.xml deleted file mode 100644 index 6a22b94775..0000000000 --- a/branches/sca-java-2.0-M4/itest/distribution/webapp-helloworld/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-distribution-webapp-helloworld - Apache Tuscany SCA iTest Distribution Webapp helloworld - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - helloworld - war - 2.0-M4-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - httpunit - httpunit - 1.6.1 - test - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - jetty6x - embedded - - org.apache.commons.logging.impl.SimpleLog - - - - - ${project.build.directory}/cargo-jetty - - - - 8085 - - - - org.apache.tuscany.sca - helloworld - war - http://localhost:8085/helloworld - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/endpoints/pom.xml b/branches/sca-java-2.0-M4/itest/endpoints/pom.xml deleted file mode 100644 index 4af0d2b6e5..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-endpoints - Apache Tuscany SCA iTest Endpoints - - - - - org.apache.tuscany.sca - tuscany-binding-jsonp-runtime - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-rmi-runtime - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - - - - - diff --git a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java b/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index c307547f56..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - - -public class HelloWorldImpl implements HelloWorldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldService.java deleted file mode 100644 index 064d615c45..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.Remotable; - -@Remotable -public interface HelloWorldService { - - String sayHello(String name); - -} diff --git a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/EndpointsTestCase.java b/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/EndpointsTestCase.java deleted file mode 100644 index 7802848c3b..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/EndpointsTestCase.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.io.IOException; -import java.net.MalformedURLException; - -import org.apache.tuscany.sca.http.jetty.JettyServer; -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 EndpointsTestCase { - - private static Node node; - - @Test - public void testJSONP1() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent1/HelloWorldService/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP2() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent2/HelloWorldService/jsonp2/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP3() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent3/HelloWorldService/jsonp3/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP4() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp4/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP5() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp5b/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP6() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent6/HelloWorldService/jsonp6a/jsonp6b/sayHello?name=petra&callback=foo"); - } - - @Test - public void testWS1() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/WSComponent1/HelloWorldService"); - } - @Test - public void testWS2() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/WSComponent2/HelloWorldService/ws2"); - } - @Test - public void testWS3() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/WSComponent3/HelloWorldService/ws3"); - } - @Test - public void testWS4() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/ws4"); - } - @Test - public void testWS5() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/ws5b"); - } - @Test - public void testWS6() throws Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/WSComponent6/HelloWorldService/ws6a/ws6b"); - } - - @BeforeClass - public static void init() throws Exception { - JettyServer.portDefault = 8085; - node = NodeFactory.newInstance().createNode("helloworld.composite").start(); - } - - @AfterClass - public static void destroy() throws Exception { - if (node != null) { - node.stop(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java b/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java deleted file mode 100644 index f3b6c15bf1..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.io.IOException; -import java.net.MalformedURLException; - -import org.apache.tuscany.sca.http.jetty.JettyServer; -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 NestedEndpointsTestCase { - - private static Node node; - - @Test - public void testJSONP1() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent1/HelloWorldService/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP2() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent2/HelloWorldService/jsonp2/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP3() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent3/HelloWorldService/jsonp3/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP4() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp4/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP5() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp5b/sayHello?name=petra&callback=foo"); - } - @Test - public void testJSONP6() throws MalformedURLException, IOException { - // - Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent6/HelloWorldService/jsonp6a/jsonp6b/sayHello?name=petra&callback=foo"); - } - - @Test - public void testWS1() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent1/HelloWorldService"); - } - @Test - public void testWS2() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent2/HelloWorldService/ws2"); - } - @Test - public void testWS3() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent3/HelloWorldService/ws3"); - } - @Test - public void testWS4() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/ws4"); - } - @Test - public void testWS5() throws MalformedURLException, Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/ws5b"); - } - @Test - public void testWS6() throws Exception { - // - Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent6/HelloWorldService/ws6a/ws6b"); - } - - @BeforeClass - public static void init() throws Exception { - JettyServer.portDefault = 8085; - node = NodeFactory.newInstance().createNode("nested.composite").start(); - } - - @AfterClass - public static void destroy() throws Exception { - if (node != null) { - node.stop(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/Utils.java b/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/Utils.java deleted file mode 100644 index 5107d8f660..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/src/test/java/test/Utils.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.List; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; - -import junit.framework.Assert; - -public class Utils { - - public static void invokeJSONPEndpoint(String s) throws MalformedURLException, IOException { - URL url = new URL(s); - BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream())); - String response = br.readLine(); - Assert.assertEquals("foo(\"Hello petra\");", response); - } - - public static void invokeWSEndpoint(String endpoint) throws Exception { - WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); - wsdlReader.setFeature("javax.wsdl.verbose",false); - wsdlReader.setFeature("javax.wsdl.importDocuments",true); - - Definition definition = wsdlReader.readWSDL(endpoint + "?wsdl"); - Assert.assertNotNull(definition); - Service service = (Service)definition.getServices().values().iterator().next(); - Port port = (Port)service.getPorts().values().iterator().next(); - - Assert.assertEquals(new URL(endpoint).getPath(), new URL(getEndpoint(port)).getPath()); - } - - private static String getEndpoint(Port port) { - List wsdlPortExtensions = port.getExtensibilityElements(); - for (final Object extension : wsdlPortExtensions) { - if (extension instanceof SOAPAddress) { - return ((SOAPAddress) extension).getLocationURI(); - } - } - throw new RuntimeException("no SOAPAddress"); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/helloworld.composite b/branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/helloworld.composite deleted file mode 100644 index 081804b34e..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/helloworld.composite +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/nested.composite b/branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/nested.composite deleted file mode 100644 index ffc73644f1..0000000000 --- a/branches/sca-java-2.0-M4/itest/endpoints/src/test/resources/nested.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/exceptions/pom.xml b/branches/sca-java-2.0-M4/itest/exceptions/pom.xml deleted file mode 100644 index bf50042468..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-exceptions - Apache Tuscany SCA iTest Exceptions - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java deleted file mode 100644 index 1f57116bac..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions; - -public class Checked extends Exception { - private static final long serialVersionUID = -129752837478357452L; - - /** - * - */ - public Checked() { - - } - - /** - * @param message - */ - public Checked(String message) { - super(message); - - } - - /** - * @param cause - */ - public Checked(Throwable cause) { - super(cause); - - } - - /** - * @param message - * @param cause - */ - public Checked(String message, Throwable cause) { - super(message, cause); - - } - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java deleted file mode 100644 index 112aefc747..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions; - -public interface ExceptionHandler { - - void testing(); - - Checked getTheBad(); - - String getTheGood(); - - UnChecked getTheUgly(); - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java deleted file mode 100644 index 53a6c70b57..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Remote exception thrower - * @version $Rev$ $Date$ - */ -@Remotable -public interface ExceptionRemoteThrower extends ExceptionThrower { -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java deleted file mode 100644 index ace219991b..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions; - -/** - * Local exception thrower - * @version $Rev$ $Date$ - */ -public interface ExceptionThrower { - Checked BAD = new Checked("theBad"); - UnChecked UGLY = new UnChecked("theUgly"); - String SO_THEY_SAY = "All is good that ends good."; - - String theGood() throws Checked; - - String theBad() throws Checked; - - String theUgly() throws Checked; - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java deleted file mode 100644 index 453528444d..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions; - -public class UnChecked extends RuntimeException { - private static final long serialVersionUID = -1318118082838092244L; - - /** - * - */ - public UnChecked() { - - } - - /** - * @param message - */ - public UnChecked(String message) { - super(message); - - } - - /** - * @param cause - */ - public UnChecked(Throwable cause) { - super(cause); - - } - - /** - * @param message - * @param cause - */ - public UnChecked(String message, Throwable cause) { - super(message, cause); - - } - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java deleted file mode 100644 index 26b9f0a383..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionHandler; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.apache.tuscany.sca.test.exceptions.UnChecked; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -@Scope("COMPOSITE") -public class ExceptionHandlerImpl implements ExceptionHandler { - static final String INIT = "INIT"; - - private ExceptionThrower exceptionThrower; - - private String theGood; - - private Checked theBad; - - private UnChecked theUgly; - - public void testing() { - - assert exceptionThrower != null : "'exceptionThrower' never wired"; - String result = INIT; - try { - theGood = result = exceptionThrower.theGood(); - assert result == ExceptionThrower.SO_THEY_SAY; - } catch (Throwable e) { - assert result == INIT; - assert false; - e.printStackTrace(); - } - - result = INIT; - try { - result = exceptionThrower.theBad(); - // incredible - assert false : "Expected 'Check' Exception"; - - } catch (Checked e) { - // This is good... - assert result == INIT; - theBad = e; - } catch (Throwable t) { - // This is not so good. - t.printStackTrace(); - assert result == INIT; - assert false : "Got wrong exception '" + t.getClass().getName(); - } - - result = INIT; - try { - result = exceptionThrower.theUgly(); - // incredible - assert false : "Expected 'UnCheck' Exception"; - - } catch (Checked e) { - // This is not so good... - assert false : "Got wrong exception '" + e.getClass().getName(); - assert result == INIT; - } catch (UnChecked e) { - theUgly = e; - - } catch (Throwable t) { - // This is not good. - assert false; - assert result == INIT; - - System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT); - } - - } - - @Reference - public void setExceptionThrower(ExceptionThrower exceptionThrower) { - this.exceptionThrower = exceptionThrower; - } - - public String getTheGood() { - return theGood; - } - - public Checked getTheBad() { - return theBad; - } - - public UnChecked getTheUgly() { - return theUgly; - } - - public ExceptionThrower getExceptionThrower() { - return exceptionThrower; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java deleted file mode 100644 index cd62338841..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionRemoteThrower; -import org.oasisopen.sca.annotation.Service; - -/** - * - * @version $Rev$ $Date$ - */ -@Service(ExceptionRemoteThrower.class) -public class ExceptionRemoteThrowerImpl implements ExceptionRemoteThrower { - public String theBad() throws Checked { - throw BAD; - } - - public String theGood() throws Checked { - return SO_THEY_SAY; - } - - public String theUgly() throws Checked { - throw UGLY; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java deleted file mode 100644 index 56b9fc6f5b..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.oasisopen.sca.annotation.Service; - -/** - * - * @version $Rev$ $Date$ - */ -@Service(ExceptionThrower.class) -public class ExceptionThrowerImpl implements ExceptionThrower { - - public String theBad() throws Checked { - throw BAD; - } - - public String theGood() throws Checked { - return SO_THEY_SAY; - } - - public String theUgly() throws Checked { - throw UGLY; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java b/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java deleted file mode 100644 index c5b54ff902..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions.impl; - -import org.apache.tuscany.sca.test.exceptions.Checked; -import org.apache.tuscany.sca.test.exceptions.ExceptionHandler; -import org.apache.tuscany.sca.test.exceptions.ExceptionRemoteThrower; -import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; -import org.apache.tuscany.sca.test.exceptions.UnChecked; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -@Scope("COMPOSITE") -public class RemoteExceptionHandlerImpl implements ExceptionHandler { - static final String INIT = "INIT"; - - private ExceptionRemoteThrower exceptionThrower; - - private String theGood; - - private Checked theBad; - - private UnChecked theUgly; - - public void testing() { - - assert exceptionThrower != null : "'exceptionThrower' never wired"; - String result = INIT; - try { - theGood = result = exceptionThrower.theGood(); - assert result == ExceptionThrower.SO_THEY_SAY; - } catch (Throwable e) { - assert result == INIT; - assert false; - e.printStackTrace(); - } - - result = INIT; - try { - result = exceptionThrower.theBad(); - // incredible - assert false : "Expected 'Check' Exception"; - - } catch (Checked e) { - // This is good... - assert result == INIT; - theBad = e; - } catch (Throwable t) { - // This is not so good. - t.printStackTrace(); - assert result == INIT; - assert false : "Got wrong exception '" + t.getClass().getName(); - } - - result = INIT; - try { - result = exceptionThrower.theUgly(); - // incredible - assert false : "Expected 'UnCheck' Exception"; - - } catch (Checked e) { - // This is not so good... - assert false : "Got wrong exception '" + e.getClass().getName(); - assert result == INIT; - } catch (UnChecked e) { - theUgly = e; - - } catch (Throwable t) { - // This is not good. - assert false; - assert result == INIT; - - System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT); - } - - } - - @Reference - public void setExceptionThrower(ExceptionRemoteThrower exceptionThrower) { - this.exceptionThrower = exceptionThrower; - } - - public String getTheGood() { - return theGood; - } - - public Checked getTheBad() { - return theBad; - } - - public UnChecked getTheUgly() { - return theUgly; - } - - public ExceptionRemoteThrower getExceptionThrower() { - return exceptionThrower; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/main/resources/ExceptionTest.composite b/branches/sca-java-2.0-M4/itest/exceptions/src/main/resources/ExceptionTest.composite deleted file mode 100644 index d42866303e..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/main/resources/ExceptionTest.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java b/branches/sca-java-2.0-M4/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java deleted file mode 100644 index 7794348476..0000000000 --- a/branches/sca-java-2.0-M4/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.exceptions; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertSame; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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 ExceptionsTestCase { - - private static Node node; - - /** - * Test exception handling over a local interface - */ - @Test - public void testLocal() { - ExceptionHandler exceptionHandler = node.getService(ExceptionHandler.class, "main"); - exceptionHandler.testing(); - assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood()); - assertNotNull(exceptionHandler.getTheBad()); - assertEquals(Checked.class, exceptionHandler.getTheBad().getClass()); - assertSame(ExceptionThrower.BAD, exceptionHandler.getTheBad()); - assertNotNull(exceptionHandler.getTheUgly()); - assertEquals(UnChecked.class, exceptionHandler.getTheUgly().getClass()); - assertSame(ExceptionThrower.UGLY, exceptionHandler.getTheUgly()); - } - - /** - * Test exception handling over a remotable interface - */ - @Test - public void testRemote() { - ExceptionHandler exceptionHandler = node.getService(ExceptionHandler.class, "mainRemote"); - exceptionHandler.testing(); - assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood()); - assertNotNull(exceptionHandler.getTheBad()); - assertEquals(Checked.class, exceptionHandler.getTheBad().getClass()); - assertNotSame(ExceptionThrower.BAD, exceptionHandler.getTheBad()); - assertNotNull(exceptionHandler.getTheUgly()); - assertEquals(UnChecked.class, exceptionHandler.getTheUgly().getClass()); - - // [rfeng] We're not in a position to copy non business exceptions - // assertNotSame(ExceptionThrower.UGLY, exceptionHandler.getTheUgly()); - - } - - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("ExceptionTest.composite"); - node = NodeFactory.newInstance().createNode("ExceptionTest.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/pom.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/pom.xml deleted file mode 100644 index 9ed22005f5..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-implementation-spring - Apache Tuscany SCA iTest Spring Implementation - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-spring-sca - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - - - - - org.springframework - spring-core - 2.5.5 - - - - org.springframework - spring-beans - 2.5.5 - - - - org.springframework - spring-context - 2.5.5 - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java deleted file mode 100644 index bd7770ca7d..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 bigbank.stockquote; - -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the StockQuote service. - */ -@Service(StockQuoteService.class) -public class StockQuoteImpl implements StockQuoteService { - - public double getQuote(String symbol) { - double price = 104.0 + Math.random(); - price = ((int)(price * 100)) / 100.0; - - System.out.println("Getting stock quote for: " + symbol + ", value: "+ price); - - return price; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java deleted file mode 100644 index 747433a9e7..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 bigbank.stockquote; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the StockQuote service. - */ -@Remotable -public interface StockQuoteService { - - public double getQuote(String symbol); -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddService.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The Add service interface - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index eae607a7ca..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Add service - */ -public class AddServiceImpl implements AddService { - - public double add(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Adding " + n1 + " and " + n2); - return n1 + n2; - } - -} \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorService.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index ce1cdaae5a..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The Calculator service interface. - */ -@Remotable -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index b033516c1b..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - public void setAddService(AddService addService) { - this.addService = addService; - } - - public AddService getAddService() { - return addService; - } - - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - public SubtractService getSubtractService() { - return subtractService; - } - - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - public DivideService getDivideService() { - return divideService; - } - - public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public MultiplyService getMultiplyService() { - return multiplyService; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiplyService.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divideService.divide(n1, n2); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideService.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The divide service interface - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Divide service. - */ -public class DivideServiceImpl implements DivideService { - - public double divide(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2); - return n1 / n2; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyService.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The interface for the multiply service - */ -public interface MultiplyService { - - double multiply(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the Multiply service. - */ -public class MultiplyServiceImpl implements MultiplyService { - - public double multiply(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2); - return n1 * n2; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractService.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -/** - * The interface for the multiply service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * An implementation of the subtract service. - */ -public class SubtractServiceImpl implements SubtractService { - - public double subtract(double n1, double n2) { - Logger logger = Logger.getLogger("calculator"); - logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2); - return n1 - n2; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java deleted file mode 100644 index 4f063993a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator.security; - -import java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.callback.UnsupportedCallbackException; - -/** - * @version $Rev$ $Date$ - */ -public class CalculatorCallbackHandler implements CallbackHandler { - - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof NameCallback) { - NameCallback nc = (NameCallback)callbacks[i]; - nc.setName("CalculatorUser"); - } else if (callbacks[i] instanceof PasswordCallback) { - PasswordCallback pc = (PasswordCallback)callbacks[i]; - pc.setPassword("CalculatorUserPasswd".toCharArray()); - } else { - throw new UnsupportedCallbackException - (callbacks[i], "Unsupported Callback!"); - } - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java deleted file mode 100644 index b3ef6e7312..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 calculator.security; - -import java.security.Principal; -import java.util.Map; - -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; -import javax.security.auth.login.LoginException; -import javax.security.auth.spi.LoginModule; - -/** - * @version $Rev$ $Date$ - */ -public class JaasLoginModule implements LoginModule { - - private CallbackHandler callbackHandler; - private Subject subject; - private Principal userPrincipal; - private String userId; - private String password; - private boolean succeeded; - private boolean commitSucceeded; - - public void initialize(Subject subject, - CallbackHandler callbackHandler, - Map sharedState, - Map options) { - this.callbackHandler = callbackHandler; - this.subject = subject; - } - - public boolean login() throws LoginException { - Callback[] callbacks = new Callback[2]; - callbacks[0] = new NameCallback("UserId:"); - callbacks[1] = new PasswordCallback("Password:", false); - - try { - callbackHandler.handle(callbacks); - userId = ((NameCallback)callbacks[0]).getName(); - password = new String(((PasswordCallback)callbacks[1]).getPassword()); - - if (userId.equals("CalculatorUser") && password.equals("CalculatorUserPasswd")) { - System.out.println("Successfully AUTHENTICATED!!"); - succeeded = true; - return true; - } else { - System.out.println("Incorrect userId / password! AUTHENTICATION FAILED!!"); - return false; - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - } - - /** - *

This method is called if the LoginContext's - * overall authentication succeeded - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * succeeded). - * - *

If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * login method), then this method associates a - * UserPrincipal - * with the Subject located in the - * LoginModule. If this LoginModule's own - * authentication attempted failed, then this method removes - * any state that was originally saved. - * - *

- * - * @exception LoginException if the commit fails. - * - * @return true if this LoginModule's own login and commit - * attempts succeeded, or false otherwise. - */ - public boolean commit() throws LoginException { - if (succeeded == false) { - return false; - } else { - // add a Principal (authenticated identity) to the Subject - - // assume the user we authenticated is the UserPrincipal - userPrincipal = new UserPrincipal(userId); - if (!subject.getPrincipals().contains(userPrincipal)) - subject.getPrincipals().add(userPrincipal); - - // in any case, clean out state - userId = null; - password = null; - commitSucceeded = true; - return true; - } - } - - /** - *

This method is called if the LoginContext's - * overall authentication failed. - * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules - * did not succeed). - * - *

If this LoginModule's own authentication attempt - * succeeded (checked by retrieving the private state saved by the - * login and commit methods), - * then this method cleans up any state that was originally saved. - * - *

- * - * @exception LoginException if the abort fails. - * - * @return false if this LoginModule's own login and/or commit attempts - * failed, and true otherwise. - */ - public boolean abort() throws LoginException { - if (succeeded == false) { - return false; - } else if (succeeded == true && commitSucceeded == false) { - // login succeeded but overall authentication failed - succeeded = false; - userId = null; - password = null; - userPrincipal = null; - } else { - // overall authentication succeeded and commit succeeded, - // but someone else's commit failed - logout(); - } - return true; - } - - /** - * Logout the user. - * - *

This method removes the SimplePrincipal - * that was added by the commit method. - * - *

- * - * @exception LoginException if the logout fails. - * - * @return true in all cases since this LoginModule - * should not be ignored. - */ - public boolean logout() throws LoginException { - subject.getPrincipals().remove(userPrincipal); - succeeded = false; - succeeded = commitSucceeded; - userId = null; - if (password != null) - password = null; - userPrincipal = null; - return true; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java deleted file mode 100644 index 595626e672..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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 calculator.security; - -import java.security.Principal; - -/** - * @version $Rev$ $Date$ - */ -public class UserPrincipal implements Principal { - - private final String name; - - public UserPrincipal(String name) { - if (name == null) - throw new IllegalArgumentException("name cannot be null"); - this.name = name; - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - final UserPrincipal other = (UserPrincipal)obj; - if (name == null) { - if (other.name != null) - return false; - } else if (!name.equals(other.name)) - return false; - return true; - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java deleted file mode 100644 index fed509df98..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 context.access; - -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; - -public class SCAApplicationContextProvider implements ApplicationContextAware { - - private static ApplicationContext ctx; - - public void setApplicationContext(ApplicationContext appContext) throws BeansException { - // Wiring the ApplicationContext into a static method - ctx = appContext; - } - - public static ApplicationContext getApplicationContext() { - return ctx; - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java deleted file mode 100644 index 8bb3006d12..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.Remotable; - -/** - * Interface for the "hello world" service - predictably simple with a single operation - * "sayHello" - * - * @version $Rev$ $Date$ - */ -@Remotable -public interface HelloWorld { - - String sayHello(String s); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index f68134702b..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * A simple proxy Java class which implements the HelloWorld interface but which uses - * a reference "delegate" to actually provide the HelloWorld service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldImpl implements HelloWorld { - - static String hello = "Hello "; - - public String sayHello(String s) { - // Simply call the reference to satisfy the service request... - System.out.println("HelloWorldImpl - sayHello called"); - return (hello + s); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java deleted file mode 100644 index 78b3649b5b..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * A simple proxy Java class which implements the HelloWorld interface but which uses - * a reference "delegate" to actually provide the HelloWorld service - * - * @version $Rev$ $Date$ - */ -public class HelloWorldProxy implements HelloWorld { - - // Here is the reference "delegate" - it implements the HelloWorld interface... - @Reference - public HelloWorld delegate; - - public String sayHello(String s) { - // Simply call the reference to satisfy the service request... - System.out.println("HelloWorldProxy - calling sayHello"); - return delegate.sayHello(s); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBean.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBean.java deleted file mode 100644 index 1a0abd7f8f..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBean.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mock; - -/** - * @version $Rev$ $Date$ - */ -public interface TestBean { - String echo(String msg); - - TestBean getBean(); - - void setBean(TestBean bean); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java deleted file mode 100644 index e3d9a36bb8..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mock; - -/** - * @version $Rev$ $Date$ - */ -public class TestBeanImpl implements TestBean { - - private TestBean bean; - - public TestBeanImpl() { - } - - public String echo(String msg) { - return msg; - } - - public TestBean getBean() { - return bean; - } - - public void setBean(TestBean bean) { - this.bean = bean; - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java deleted file mode 100644 index 47342fded8..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mock; - -/** - * A simple test Spring bean which provides the HelloWorld service - * - * @version $Rev$ $Date$ - */ - -import helloworld.HelloWorld; - -public class TestHelloWorldBean implements HelloWorld { - - static String hello = "Hello "; - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestHelloWorldBean - sayHello called"); - return (hello + message); - } - -} // end class TestHelloWorldBean diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReference.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReference.java deleted file mode 100644 index 6f5b280f31..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReference.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mock; - -/** - * @version $Rev$ $Date$ - */ -public interface TestReference { - String echo(String msg); -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java deleted file mode 100644 index dea7933e1a..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mock; - -/** - * A test Spring bean which provides the HelloWorld service by calling a reference - * to provide the content of the response - * - * @version $Rev$ $Date$ - */ - -import helloworld.HelloWorld; - -public class TestReferenceBean implements HelloWorld { - - // The reference - private HelloWorld bean; - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestReferenceBean - sayHello called"); - return (bean.sayHello(message)); - } - - /** - * Setter for the bean reference - * @param theBean - */ - public void setBean(HelloWorld theBean) { - this.bean = theBean; - } - - /** - * Getter for the reference - * @return - */ - public HelloWorld getBean() { - return this.bean; - } - -} // end class TestReferenceBean diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java deleted file mode 100644 index b80b05dc08..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mock; - -/** - * A test Spring bean which provides the HelloWorld service. - * This bean has a single String property called "hello" which must be set through - * external configuration to give the correct response message, otherwise an (incorrect) - * default message is generated - * - * @version $Rev$ $Date$ - */ - -import helloworld.HelloWorld; - -public class TestSCAPropertyBean implements HelloWorld { - - private String hello = "Go away"; - - /** - * Provides the operation of the "HelloWorld" interface - a simple string response - * to a string input message, where the response is a greeting followed by the original - * input message. - */ - public String sayHello(String message) { - System.out.println("TestHelloWorldBean - sayHello called"); - return (hello + " " + message); - } - - /** - * Public setter for the (unannotated) field "hello" which constitutes an SCA - * property - * @param message - the message to use for the response to "sayHello" - */ - public void setHello(String message) { - hello = message; - } - -} // end class TestSCAPropertyBean diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java deleted file mode 100644 index ecb085858d..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 spring.annotations; - -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Service; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.ComponentName; - -import calculator.AddService; -import calculator.CalculatorService; -import calculator.DivideService; -import calculator.MultiplyService; -import calculator.SubtractService; - -/** - * An implementation of the Calculator service. - */ -@Service(CalculatorService.class) -public class CalculatorServiceImpl implements AddService, SubtractService, MultiplyService, DivideService { - - public AddService addService; // setter injection - - @Reference - public SubtractService subtractService; // field injection - - @Reference(name="multiplyService", required=false) - public MultiplyService multiply; // field injection (different reference and field name) - - public DivideService divide; // setter injection (different reference and field name) - - public String message; // setter injection - - @Property(name="message", required=false) - public String message2; // field injection - - public String componentName; - - @Init - public void initMethod () { - System.out.println("Init method is sucessfully called....."); - // Property value should be null here. - System.out.println("Property Value message is...." + message); - } - - @Destroy - public void destroyMethod () { - System.out.println("Component Name is...." + componentName); - System.out.println("Property Value message is...." + message); - System.out.println("Property Value message2 is...." + message2); - System.out.println("Destroy method is sucessfully called....."); - } - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - public AddService getAddService() { - return addService; - } - - /*public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - public SubtractService getSubtractService() { - return subtractService; - }*/ - - @Reference(name="divideService", required=false) - public void setDivideService(DivideService divide) { - this.divide = divide; - } - - public DivideService getDivideService() { - return divide; - } - - /*public void setMultiplyService(MultiplyService multiplyService) { - this.multiplyService = multiplyService; - } - - public MultiplyService getMultiplyService() { - return multiplyService; - }*/ - - @ComponentName - public void setComponentName(String componentName) { - this.componentName = componentName; - } - - @Property - public void setMessage(String message) { - this.message = message; - } - - public double add(double n1, double n2) { - return addService.add(n1, n2); - } - - public double subtract(double n1, double n2) { - return subtractService.subtract(n1, n2); - } - - public double multiply(double n1, double n2) { - return multiply.multiply(n1, n2); - } - - public double divide(double n1, double n2) { - return divide.divide(n1, n2); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml deleted file mode 100644 index 81d59432b8..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite deleted file mode 100644 index abdaa98bff..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite deleted file mode 100644 index dd186bddfc..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml deleted file mode 100644 index c50f0ef4d9..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml deleted file mode 100644 index a0bb10e8dd..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite deleted file mode 100644 index 1c4b81db33..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF deleted file mode 100644 index 9267f28e83..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Spring-Context: META-INF/spring/beanRefContext.xml; META-INF/spring/StockQuoteService-context.xml - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml deleted file mode 100644 index 62e4e077b6..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml deleted file mode 100644 index 5b1885d6b3..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml deleted file mode 100644 index dcc88f6770..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config deleted file mode 100644 index 0e7cb86633..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config +++ /dev/null @@ -1,3 +0,0 @@ -Calculator { - calculator.security.JaasLoginModule required debug=true; -}; diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties deleted file mode 100644 index 0238f0b013..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -CALLING_OPERATION=Inovoking operation {0} with arguments {1} -OPERATION_RETURNED=Returning from operation {0} with return value {1} \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite deleted file mode 100644 index 1000e616a7..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml deleted file mode 100644 index c50f0ef4d9..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml deleted file mode 100644 index 278c94a18e..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - Calculator - calculator.security.CalculatorCallbackHandler - - - - - - - FINER - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite deleted file mode 100644 index 2731fc455f..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - Hello - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF deleted file mode 100644 index 950dbeba4c..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Spring-Context: META-INF/spring/SpringSCAProperty-context.xml - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml deleted file mode 100644 index 8613e6c82a..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite deleted file mode 100644 index e8357cc62e..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - Hello - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar deleted file mode 100644 index 504d59e5ff..0000000000 Binary files a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar and /dev/null differ diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml deleted file mode 100644 index 9912624870..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml deleted file mode 100644 index 62e4e077b6..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite deleted file mode 100644 index b8389be7f6..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite deleted file mode 100644 index 8d1a655c4e..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml deleted file mode 100644 index 1705164104..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml deleted file mode 100644 index 539dfa6e32..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite deleted file mode 100644 index 294b211431..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite deleted file mode 100644 index c77ab00323..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml deleted file mode 100644 index 42e0cdbd23..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml deleted file mode 100644 index 83558e8abc..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite deleted file mode 100644 index b7c45b289f..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite deleted file mode 100644 index e1ccbcf3c6..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite deleted file mode 100644 index 236e2b23e6..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - HelloWorld - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml b/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml deleted file mode 100644 index 4a873f2424..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java deleted file mode 100644 index 4503294f10..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 context.access; - -import java.io.File; -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.Contribution; -import org.springframework.context.ApplicationContext; - -import context.access.SCAApplicationContextProvider; -import calculator.CalculatorService; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/context/access/ContextAccess.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/context/access/").toURI().toURL().toString())); - node.start(); - - // Code: To access the Spring Application Context instance - ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext(); - if (ctx.containsBean("CalculatorServiceBean")) - System.out.println("CalculatorServiceBean is now available for use..."); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java deleted file mode 100644 index 2602839d1d..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 context.access; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class ContextAccessTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java deleted file mode 100644 index 254b8100e1..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 context.imports; - -import java.io.File; - -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.Contribution; -import calculator.CalculatorService; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/context/imports/ContextImports.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/context/imports/").toURI().toURL().toString())); - node.start(); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java deleted file mode 100644 index 8df60c5bab..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 context.imports; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class ContextImportsTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java deleted file mode 100644 index f5261c85bb..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 context.multiple; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class MultipleContextTestCase extends TestCase { - - public void testServer() throws Exception { - StockQuoteServer.main(new String[] {"1000"}); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java deleted file mode 100644 index 9ff1b74567..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 context.multiple; - -import java.io.File; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.springframework.context.ApplicationContext; -import context.access.SCAApplicationContextProvider; - -/** - * This server program shows how to bootstrap SCA from a simple J2SE program - * and start it which activates the StockQuote Web service endpoint. - */ -public class StockQuoteServer { - - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/context/multiple/MultipleContext.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/context/multiple/").toURI().toURL().toString())); - node.start(); - - // Method 1: To access the Spring Application Context instance - ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext(); - if (ctx.containsBean("StockQuoteServiceBean")) - System.out.println("StockQuoteServiceBean is now available for use..."); - - System.out.println("Press Enter to Exit..."); - Thread.sleep(1000); - - node.stop(); - System.out.println("Bye"); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java deleted file mode 100644 index 8b12dd7af7..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 implementation.policies; - -import java.io.File; - -import javax.security.auth.login.Configuration; -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import calculator.CalculatorService; - - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - try { - Configuration secConf = Configuration.getConfiguration(); - } catch (java.lang.SecurityException e) { - System.setProperty("java.security.auth.login.config", CalculatorClient.class.getClassLoader() - .getResource("implementation/policies/CalculatorJass.config").toString()); - } - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/implementation/policies/ImplementationPolicies.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/implementation/policies/").toURI().toURL().toString())); - node.start(); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - // Calculate - System.out.println("Calling CalculatorServiceComponent configured with 'logging' " + - "policy for subtract and divide operations..."); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - calculatorService = - ((Client)node).getService(CalculatorService.class, "AnotherCalculatorServiceComponent"); - - // Calculate - System.out.println("Calling CalculatorServiceComponent configured with 'logging' " + - "for all operations in the implementation..."); - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - System.out.println("Bye"); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java deleted file mode 100644 index a44ae38d24..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 implementation.policies; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class ImplementationPoliciesTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java deleted file mode 100644 index d54f0544d8..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 location.folder; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of Properties from a Spring application - * context, where the properties are explicit, through the presence of an sca:property - * element within the Spring application context - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation - * 2) The element references an application context that - * uses an explicit sca:property element which is used to compute the response to an invocation - * of the service of the implementation - * - * @version $Rev$ $Date$ - */ -public class SpringFolderLocationTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringFolderLocationTestCase() { - super("SpringFolderLocation.composite", "location/folder/"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java deleted file mode 100644 index 71768f5a7b..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 location.jar; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of Properties from a Spring application - * context, where the properties are explicit, through the presence of an sca:property - * element within the Spring application context - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation - * 2) The element references an application context that - * uses an explicit sca:property element which is used to compute the response to an invocation - * of the service of the implementation - * - * @version $Rev$ $Date$ - */ -public class SpringJarLocationTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringJarLocationTestCase() { - super("SpringJarLocation.composite", "location/jar/"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java deleted file mode 100644 index 0c6f8d2e84..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - - -/** - * Basic "hello world" style test case for testing Spring component implementation - * - */ -public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase { - - /** - * Calls the hello world service and checks that it gives the right response... - */ - public AbstractHelloWorldTestCase(String compositeName, String contributionLocation) { - super(compositeName, contributionLocation); - } - - public void testHello() throws Exception { - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected Class getServiceClass() { - return HelloWorld.class; - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java deleted file mode 100644 index 73b151bf7a..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - -import java.io.File; -import junit.framework.TestCase; -import java.net.MalformedURLException; - -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public abstract class AbstractSCATestCase extends TestCase { - - protected Node node; - protected T service; - protected String compositeName; - protected String contributionLocation; - - public AbstractSCATestCase(String compositeName, String contributionLocation) { - super(); - this.compositeName = compositeName; - this.contributionLocation = contributionLocation; - } - - @Override - protected void setUp() throws Exception { - NodeFactory factory = NodeFactory.newInstance(); - node = factory.createNode(new File("src/main/resources/" + contributionLocation + compositeName).toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/" + contributionLocation).toURI().toURL().toString())); - node.start(); - service = ((Client)node).getService(getServiceClass(), "ClientComponent"); - } - - abstract protected Class getServiceClass(); - - @Override - protected void tearDown() throws Exception { - node.stop(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java deleted file mode 100644 index 5869d344f6..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Interface for the "hello world" service - predictably simple with a single operation - * "sayHello" - * - */ -@Remotable -public interface HelloWorld { - - public String sayHello(String s); - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java deleted file mode 100644 index 90d26dd89f..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - -import org.oasisopen.sca.annotation.Reference; - -/** - * A simple proxy Java class which implements the HelloWorld interface but which uses - * a reference "delegate" to actually provide the HelloWorld service - * - */ -public class HelloWorldProxy implements HelloWorld { - - // Here is the reference "delegate" - it implements the HelloWorld interface... - @Reference - public HelloWorld delegate; - - public String sayHello(String s) { - // Simply call the reference to satisfy the service request... - System.out.println("HelloWorldProxy - calling sayHello"); - return delegate.sayHello(s); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java deleted file mode 100644 index f28dace31a..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * - */ -public class SpringDelegationHelloWorldTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringDelegationHelloWorldTestCase() { - super("SpringDelegationHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/"); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java deleted file mode 100644 index def30b3ea0..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * 3) The Spring component delegates function to a second spring bean - * - */ -public class SpringHelloWorldTestCase extends AbstractHelloWorldTestCase { - - // super class does it all getting composite based on this class name - public SpringHelloWorldTestCase() { - super("SpringHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/"); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java deleted file mode 100644 index fa7967c964..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - -/** - * A simple test Spring bean which provides the HelloWorld service - * - */ - -public class TestHelloWorldBean implements HelloWorld { - - static String hello = "Hello "; - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestHelloWorldBean - sayHello called"); - return (hello + message); - } - -} // end class TestHelloWorldBean diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java deleted file mode 100644 index b57cc7f366..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.spring; - -/** - * A simple test Spring bean which delgates to another bean - * - */ - -public class TestHelloWorldDelegatorBean implements HelloWorld { - - HelloWorld delegate; - - public void setDelegate(HelloWorld delegate) { - this.delegate = delegate; - } - - // Classic "Hello xxx" response to any input message - public String sayHello(String message) { - System.out.println("TestHelloWorldDelegatorBean - sayHello called"); - return delegate.sayHello(message); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java deleted file mode 100644 index 0c2e1daa81..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sca.references; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of References from a Spring application - * context, where the references are explicit, through the presence of an sca:reference - * element within the Spring application context - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation which makes - * a reference to a second component - * 2) The composite has a component with a Java POJO implementation which satisfies the reference - * 3) The element references an application context that - * uses an explicit sca:reference element to identify the reference made by the Spring application - * - * @version $Rev$ $Date$ - */ -public class SpringExplicitReferenceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringExplicitReferenceTestCase() { - super("SpringExplicitReference.composite", "sca/references/"); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java deleted file mode 100644 index 8d0c548899..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sca.references; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A test case designed to test the implementation of References from a Spring application - * context, where the references are implicit, through the presence of Bean properties with a - * ref attribute which is not satisfied by a Bean within the application context. - * - * The artifacts involved in this test are: - * - * 1) A composite containing a component with a Spring implementation which makes - * a reference to a second component - * 2) The composite has a component with a Java POJO implementation which satisfies the reference - * 3) The element references an application context that - * does not use an explicit sca:reference element to identify the reference made by the - * Spring application, but relies on an unsatisfied Bean property with a ref attribute. - * - * @version $Rev$ $Date$ - */ -public class SpringImplicitReferenceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringImplicitReferenceTestCase() { - super("SpringImplicitReference.composite", "sca/references/"); - } -} - - diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java deleted file mode 100644 index f4bd53876c..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sca.services; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * 3) The element references an application context that - * uses an explicit sca: element to identify the service offered by the Spring application - * - * @version $Rev$ $Date$ - */ -public class SpringExplicitServiceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringExplicitServiceTestCase() { - super("SpringExplicitService.composite", "sca/services/"); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java deleted file mode 100644 index 0907985d7f..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 sca.services; - -import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase; - -/** - * A basic test case of: - * 1) A composite containing a component with a Spring implementation - * 2) The composite has a component with a Java POJO implementation which uses the - * Spring implementation to satisfy a reference - * - * @version $Rev$ $Date$ - */ -public class SpringImplicitServiceTestCase extends AbstractHelloWorldTestCase { - // super class does it all getting composite based on this class name - - public SpringImplicitServiceTestCase() { - super("SpringImplicitService.composite", "sca/services/"); - } -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java deleted file mode 100644 index 13b84c8c73..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 spring.annotations; - -import java.io.File; - -import org.apache.tuscany.sca.node.Client; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import calculator.CalculatorService; - - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -public class CalculatorClient { - public static void main(String[] args) throws Exception { - - NodeFactory factory = NodeFactory.newInstance(); - Node node = factory.createNode(new File("src/main/resources/spring/annotations/Calculator.composite").toURI().toURL().toString(), - new Contribution("TestContribution", new File("src/main/resources/spring/annotations/").toURI().toURL().toString())); - node.start(); - - CalculatorService calculatorService = - ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - System.out.println("3 + 2=" + calculatorService.add(3, 2)); - System.out.println("3 - 2=" + calculatorService.subtract(3, 2)); - System.out.println("3 * 2=" + calculatorService.multiply(3, 2)); - System.out.println("3 / 2=" + calculatorService.divide(3, 2)); - - node.stop(); - System.out.println("Bye"); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java b/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java deleted file mode 100644 index 5db9c84c00..0000000000 --- a/branches/sca-java-2.0-M4/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 spring.annotations; - -import junit.framework.TestCase; - -/** - * Tests out the big bank service - * - */ -public class SpringAnnotationsTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/pom.xml b/branches/sca-java-2.0-M4/itest/interfaces/pom.xml deleted file mode 100644 index ea2199f7fe..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-interfaces - Apache Tuscany SCA iTest Interface - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java deleted file mode 100644 index f4131593d5..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -/** - * only for callBack - */ -public interface LocalCallbackInterface { - - void callbackMethod(String str); - - void modifyParameter(ParameterObject po); - -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java deleted file mode 100644 index 5fc9ed51b3..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.OneWay; - -/* - * itest for interface: local,method-overloading - */ -public interface LocalClientComponent { - - String foo1(ParameterObject po); - - String foo1(String str) throws Exception; - - String foo2(String str, int i); - - String foo2(int i, String str) throws Exception; - - void callback(String str); - - void callModifyParameter(); - - @OneWay - void onewayMethod(String str); - - String getCallbackValue(); - - String getOnewayValue(); -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java deleted file mode 100644 index 6cd937af12..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(LocalClientComponent.class) -public class LocalClientComponentImpl implements LocalClientComponent, LocalCallbackInterface { - - @Reference - protected LocalServiceComponent aCallBackService; - private static String callbackValue; - private static String onewayValue; - - public String foo1(ParameterObject po) { - po.field1 = "AComponent"; - return "AComponent"; - } - - public String foo1(String str) throws Exception { - return str + "AComponent"; - } - - public String foo2(String str, int i) { - return str + "AComponent" + i; - } - - public String foo2(int i, String str) throws Exception { - return str + "AComponent" + i; - } - - public void callback(String str) { - aCallBackService.callback(str); - } - - public void callbackMethod(String str) { - callbackValue = str; - } - - public void callModifyParameter() { - this.aCallBackService.modifyParameter(); - } - - public String getCallbackValue() { - return callbackValue; - } - - public void onewayMethod(String str) { - onewayValue = str; - try { - Thread.sleep(200); - } catch (Exception e) { - //do nothing - } - } - - public String getOnewayValue() { - return onewayValue; - } - - public void modifyParameter(ParameterObject po) { - po.field1 = "AComponent"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java deleted file mode 100644 index 05a9d09bdd..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.Callback; - -/** - * Local be-directional callBackService - */ -@Callback(LocalCallbackInterface.class) -public interface LocalServiceComponent { - - String foo(String str); - - void callback(String str); - - void modifyParameter(); - - ParameterObject getPO(); - -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java deleted file mode 100644 index ab0b18191c..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(LocalServiceComponent.class) -public class LocalServiceComponentImpl implements LocalServiceComponent { - - @Callback - protected LocalCallbackInterface callback; - - private static ParameterObject po; - - public void callback(String str) { - callback.callbackMethod(str); - } - - public void modifyParameter() { - po = new ParameterObject("CallBack"); - callback.modifyParameter(po); - } - - public String foo(String str) { - return str; - } - - public ParameterObject getPO() { - return po; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java deleted file mode 100644 index 724d94dffb..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import java.io.Serializable; - -public class ParameterObject implements Serializable { - private static final long serialVersionUID = 1L; - public String field1; - - public ParameterObject() { - this.field1 = null; - } - - public ParameterObject(String field1) { - this.field1 = field1; - } - - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ParameterObject) { - ParameterObject other = (ParameterObject)o; - if (field1 != null) { - return field1.equals(other.field1); - } - } - return false; - } -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java deleted file mode 100644 index be3fa4c15a..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * only for callBack - */ -@Remotable -public interface RemoteCallbackInterface { - - void callbackMethod(String str); - - void modifyParameter(ParameterObject po); -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java deleted file mode 100644 index 9f34dfd274..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.Remotable; - -/* - * different signatures - */ - -@Remotable -public interface RemoteClientComponent { - - String foo1(ParameterObject po); - - String foo3(ParameterObject po); - - String foo2(int i, String str1) throws Exception; - - void callback(String str); - - void callModifyParameter(); - - String getCallbackValue(); - - void onewayMethod(String str); - - String getOnewayValue(); -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java deleted file mode 100644 index 541b1f1508..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.AllowsPassByReference; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(RemoteClientComponent.class) -public class RemoteClientComponentImpl implements RemoteClientComponent, RemoteCallbackInterface { - - @Reference - protected RemoteServiceComponent aCallBackService; - private static String callbackValue; - private static String onewayValue; - - public String foo1(ParameterObject po) { - po.field1 = "BComponent"; - return "BComponent"; - } - - @AllowsPassByReference - public String foo3(ParameterObject po) { - po.field1 = "BComponent"; - return "BComponent"; - } - - public String foo2(int i, String str) throws Exception { - return str + "BComponent" + i; - } - - public void callback(String str) { - aCallBackService.callback(str); - } - - public void callModifyParameter() { - this.aCallBackService.modifyParameter(); - } - - public void callbackMethod(String str) { - callbackValue = str; - } - - public String getCallbackValue() { - return callbackValue; - } - - public void onewayMethod(String str) { - onewayValue = str; - try { - Thread.sleep(200); - } catch (Exception e) { - //do nothing - } - } - - public String getOnewayValue() { - return onewayValue; - } - - public void modifyParameter(ParameterObject po) { - po.field1 = "BComponent"; - } -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java deleted file mode 100644 index b29b298ab6..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(RemoteCallbackInterface.class) -public interface RemoteServiceComponent { - - String foo(String str); - - void callback(String str); - - void modifyParameter(); - - ParameterObject getPO(); - - String[] bar(int[][] intArray); -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java b/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java deleted file mode 100644 index 00a0f5645b..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -@Service(RemoteServiceComponent.class) -public class RemoteServiceComponentImpl implements RemoteServiceComponent { - - @Callback - protected RemoteCallbackInterface callback; - - private static ParameterObject po; - - public void callback(String str) { - callback.callbackMethod(str); - } - - public void modifyParameter() { - po = new ParameterObject("CallBack"); - callback.modifyParameter(po); - } - - public String foo(String str) { - return str; - } - - public ParameterObject getPO() { - return po; - } - - public String[] bar(int[][] intArray) { - return new String[] {"int"}; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InterfacesTest.composite b/branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InterfacesTest.composite deleted file mode 100644 index 27ada047b9..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InterfacesTest.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InvalidRemoteAttribute.composite b/branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InvalidRemoteAttribute.composite deleted file mode 100644 index c91d49a49a..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/main/resources/InvalidRemoteAttribute.composite +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java deleted file mode 100644 index 31e40d59c5..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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; - -@Ignore("TUSCANY-3138") -public class InterfacesTestCase { - private static Node node; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("InterfacesTest.composite"); - node = NodeFactory.newInstance().createNode("InterfacesTest.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testLocalClient() { - LocalServiceComponent service = node.getService(LocalServiceComponent.class, "LocalServiceComponent"); - LocalClientComponent local = node.getService(LocalClientComponent.class, "LocalClientComponent"); - - try { - ParameterObject po = new ParameterObject(); - assertEquals("AComponent", local.foo1(po)); - assertEquals("AComponent", po.field1); - - assertEquals("AAComponent", local.foo1("A")); - - assertEquals("AAComponent1", local.foo2("A", 1)); - assertEquals("AAComponent1", local.foo2(1, "A")); - } catch (Exception e) { - fail(); - } - - try { - // test local callback - local.callback("CallBack"); - Thread.sleep(100); - assertEquals("CallBack", local.getCallbackValue()); - - local.callModifyParameter(); - Thread.sleep(100); - assertEquals("AComponent", service.getPO().field1); - } catch (Exception e) { - e.printStackTrace(); - fail("CallBack failed"); - } - - try { - local.onewayMethod("OneWay"); - Thread.sleep(100); - assertEquals("OneWay", local.getOnewayValue()); - } catch (Exception e) { - fail("OneWay failed"); - } - } - - @Test - public void testRemoteClient() { - RemoteServiceComponent service = node.getService(RemoteServiceComponent.class, "RemoteServiceComponent"); - RemoteClientComponent remote = node.getService(RemoteClientComponent.class, "RemoteClientComponent"); - - try { - // Test Pass By Value - ParameterObject po = new ParameterObject("NotBComponent"); - assertEquals("BComponent", remote.foo1(po)); - assertEquals("NotBComponent", po.field1); - - assertEquals("BBComponent1", remote.foo2(1, "B")); - - // Test allowsPassByReference - assertEquals("BComponent", remote.foo3(po)); - assertEquals("BComponent", po.field1); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - - try { - remote.callback("CallBack"); - Thread.sleep(100); - assertEquals("CallBack", remote.getCallbackValue()); - - remote.callModifyParameter(); - Thread.sleep(100); - assertEquals("CallBack", service.getPO().field1); - } catch (Exception e) { - fail("CallBack failed"); - } - - try { - remote.onewayMethod("OneWay"); - Thread.sleep(100); - assertEquals("OneWay", remote.getOnewayValue()); - } catch (Exception e) { - fail("OneWay failed"); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java b/branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java deleted file mode 100644 index b1d4dba07d..0000000000 --- a/branches/sca-java-2.0-M4/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.interfaces; - -import org.apache.tuscany.sca.interfacedef.InvalidAnnotationException; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.Test; - -public class InvalidRemoteAttributeTestCase { - - @Test - public void testInvalidRemoteAttribute() throws Exception { - Node node = null; - - try { - String location = ContributionLocationHelper.getContributionLocation("InvalidRemoteAttribute.composite"); - node = NodeFactory.newInstance().createNode("InvalidRemoteAttribute.composite", new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - if (! e.getCause().getClass().equals(InvalidAnnotationException.class)) { - throw e; - } - } finally { - if (node != null) { - node.stop(); - } - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/pom.xml b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/pom.xml deleted file mode 100644 index 1312122789..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jaxws-asyncclient - Apache Tuscany JAX-WS Integration Tests - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java deleted file mode 100644 index 4e55bae98d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java +++ /dev/null @@ -1,36 +0,0 @@ -package stock; -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - - -import javax.jws.WebService; - -/** - * JAX-WS Async style Stock quote interface - * - * @version $Rev: 828277 $ $Date: 2009-10-22 02:40:52 +0100 (Thu, 22 Oct 2009) $ - */ - -@WebService -public interface StockQuote { - - float getPrice(String ticker); - -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java deleted file mode 100644 index 0bf3328c31..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 stock; - -import java.util.concurrent.ExecutionException; - -import javax.xml.ws.AsyncHandler; -import javax.xml.ws.Response; - -import org.oasisopen.sca.annotation.Reference; - -public class StockQuoteClient { - - @Reference public StockQuoteRef stockQuote; - - public float getPrice(String ticker) { - return stockQuote.getPrice(ticker); - } - - public float getPriceAsyncPoll(String ticker) throws InterruptedException, ExecutionException { - Response response = stockQuote.getPriceAsync("foo"); - return response.get(); - } - - float price = 0f; - Object mutex = new Object(); - Exception exception; - - public float getPriceAsyncCallback(String ticker) throws Exception { - AsyncHandler callback = new AsyncHandler() { - public void handleResponse(Response arg) { - synchronized (mutex) { - try { - price = arg.get(); - } catch (Exception e) { - exception = e; - } - mutex.notify(); - } - } - }; - stockQuote.getPriceAsync("foo", callback); - synchronized (mutex) { - if (price == 0f) - mutex.wait(5000); // wait for up to 5 seconds - } - - if (exception != null) throw exception; - return price; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java deleted file mode 100644 index a43b85361b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 stock; - - -/** - * Stock quote impl - * - * @version $Rev: 828277 $ $Date: 2009-10-22 02:40:52 +0100 (Thu, 22 Oct 2009) $ - */ -public class StockQuoteImpl implements StockQuote { - - public float getPrice(String ticker) { - return 10; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java deleted file mode 100644 index b15ab6be08..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java +++ /dev/null @@ -1,39 +0,0 @@ -package stock; -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - - -import java.util.concurrent.Future; - -import javax.xml.ws.AsyncHandler; -import javax.xml.ws.Response; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * JAX-WS Async style Stock quote interface - */ -@Remotable -public interface StockQuoteRef extends StockQuote { - - Response getPriceAsync(String ticker); - - Future getPriceAsync(String ticker, AsyncHandler callback); -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 11ace7a788..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite deleted file mode 100644 index 313edf0435..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java b/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java deleted file mode 100644 index eb72924093..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java +++ /dev/null @@ -1,67 +0,0 @@ -package itest; -import java.util.concurrent.ExecutionException; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import stock.StockQuoteClient; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -public class AsyncServiceTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } - - @Test - public void invokeRPC() { - StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient"); - Assert.assertEquals(10.0f, sc.getPrice("foo")); - } - - @Test - public void invokeAsyncPoll() throws InterruptedException, ExecutionException { - StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient"); - Assert.assertEquals(10.0f, sc.getPriceAsyncPoll("foo")); - } - - @Test - public void invokeAsyncCallback() throws Exception { - StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient"); - Assert.assertEquals(10.0f, sc.getPriceAsyncCallback("foo")); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws/pom.xml b/branches/sca-java-2.0-M4/itest/jaxws/pom.xml deleted file mode 100644 index 94b85e5b9d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jaxws - Apache Tuscany JAX-WS Integration Tests - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - diff --git a/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java b/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java deleted file mode 100644 index e1c2bedea3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java +++ /dev/null @@ -1,42 +0,0 @@ -package stock; -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.Test; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -public class AsyncServiceTestCase { - - @Test - public void init() throws Exception { - try{ - String location = ContributionLocationHelper.getContributionLocation("StockQuote.composite"); - Node node = NodeFactory.newInstance().createNode("StockQuote.composite", new Contribution("c1", location)); - node.start(); - node.stop(); - } catch (Exception e) { - Assert.assertTrue(e.getMessage().contains("[JCA100006]")); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuote.java b/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuote.java deleted file mode 100644 index 74e25bb3bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuote.java +++ /dev/null @@ -1,45 +0,0 @@ -package stock; -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - - -import java.util.concurrent.Future; - -import javax.jws.WebService; -import javax.xml.ws.AsyncHandler; -import javax.xml.ws.Response; - -/** - * JAX-WS Async style Stock quote interface - * - * @version $Rev$ $Date$ - */ - -@WebService -public interface StockQuote { - - float getPrice(String ticker); - - Response getPriceAsync(String ticker); - - Future getPriceAsync(String ticker, AsyncHandler callback); - - -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuoteImpl.java b/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuoteImpl.java deleted file mode 100644 index 516c63d864..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws/src/test/java/stock/StockQuoteImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 stock; - -import java.util.concurrent.Future; - -import javax.xml.ws.AsyncHandler; -import javax.xml.ws.Response; - -/** - * Stock quote impl - * - * @version $Rev$ $Date$ - */ -public class StockQuoteImpl implements StockQuote { - - public float getPrice(String ticker) { - return 10; - } - - public Response getPriceAsync(String ticker) { - return null; - } - - public Future getPriceAsync(String ticker, AsyncHandler callback) { - return null; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jaxws/src/test/resources/StockQuote.composite b/branches/sca-java-2.0-M4/itest/jaxws/src/test/resources/StockQuote.composite deleted file mode 100644 index b2c9bd8ddb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jaxws/src/test/resources/StockQuote.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/pom.xml b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/pom.xml deleted file mode 100644 index 8e2000b2c6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-dynamic-replyq - Apache Tuscany SCA iTest JMS with dynamic replyq - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldClientImpl implements HelloWorldService { - - private HelloWorldService serviceA; - - @Reference - public void setServiceA(HelloWorldService service) { - this.serviceA = service; - } - - public String sayHello(String name) { - return serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldService { - String sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - if ("bang".equals(name)) { - throw new RuntimeException("blem wit"); - } - return "jmsHello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a9d43b5637..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite deleted file mode 100644 index cbad991ac5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite deleted file mode 100644 index 01553a968c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java b/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java deleted file mode 100644 index 3bf4e0bc30..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class DynamicReplyQTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient"); - assertEquals("jmsHello Beate", helloWorldService.sayHello("Beate")); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/args/pom.xml b/branches/sca-java-2.0-M4/itest/jms/args/pom.xml deleted file mode 100644 index b2f49c91e2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-args - Apache Tuscany SCA iTest JMS Args - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - - org.apache.activemq - activemq-core - 5.2.0 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index 68506b857b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the OneWay service. - */ -@Service(MyService.class) -public class ClientImpl implements MyService { - - private MyService serviceA; - - @Reference - public void setServiceA(MyService service) { - this.serviceA = service; - } - - public void sayHello(String name, String n2) { - serviceA.sayHello(name, n2); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java b/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java deleted file mode 100644 index 5f19aa1fa5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface MyService { - - @OneWay - void sayHello(String name, String n2); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java deleted file mode 100644 index 18324d5d1d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - - -public class ServiceImpl implements MyService { - - public static Object lock = new Object(); - public static String name; - public static String n2; - - public void sayHello(String name, String n2) { - System.out.println("SelectorServiceImpl1 " + name + n2); - ServiceImpl.name = name; - ServiceImpl.n2 = n2; - synchronized (ServiceImpl.lock) { - ServiceImpl.lock.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 07caa57490..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/jndi.properties deleted file mode 100644 index bb431a592b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory, ConnectionFactory2 - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic -topic.ServiceTopic = ServiceTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/selectors/selectors.composite b/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/selectors/selectors.composite deleted file mode 100644 index 1a9075f6d4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/src/main/resources/selectors/selectors.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java deleted file mode 100644 index 28e0b530c1..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - */ -public class ArgsTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testSayHello() throws Exception { - MyService client1 = node.getService(MyService.class, "Client1"); - - client1.sayHello("petra", "beate"); - - synchronized(ServiceImpl.lock) { - if (ServiceImpl.name == null) { - ServiceImpl.lock.wait(5000); - } - } - - assertEquals("petra", ServiceImpl.name); - assertEquals("beate", ServiceImpl.n2); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/pom.xml b/branches/sca-java-2.0-M4/itest/jms/callbacks/pom.xml deleted file mode 100644 index 1f6a27cb53..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-jms-callbacks - Apache Tuscany SCA iTest JMS Tests For Callbacks - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - - org.apache.activemq - activemq-core - 5.2.0 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java deleted file mode 100644 index d4cd5df431..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - - -/** - * The client interface - */ -public interface JMSClient { - - void aClientMethod(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java deleted file mode 100644 index a4d5190af3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * Remote Web service client with callback interface - */ -@Service(JMSClient.class) -public class JMSClientImpl implements JMSClient, JMSServiceCallback { - - @Reference protected JMSService myService; - - public static String result; - public static Object lock = new Object(); - - public void aClientMethod() { - System.out.println("aClientMethod " + this + " on thread " + Thread.currentThread()); - myService.someMethod(" -> someMethod "); // calls the server - System.out.println("aClientMethod return from someMethod on thread " + Thread.currentThread()); - } - - public void receiveResult(String result) { - System.out.println("receiveResult " + this + " '" + result + "' on thread " + Thread.currentThread()); - JMSClientImpl.result = result; - - // wakeup the waiting testcase - synchronized (lock) { - lock.notifyAll(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java deleted file mode 100644 index b78feab413..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * The remote service that will be invoked by the client - */ -@Remotable -@Callback(JMSServiceCallback.class) -public interface JMSService { - - @OneWay - void someMethod(String arg); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java deleted file mode 100644 index 20b74ccc1a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * The callback interface for {@link JMSService}. - */ -@Remotable -public interface JMSServiceCallback { - - @OneWay - void receiveResult(String result); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java deleted file mode 100644 index e8357338ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements MyService and uses a callback. - */ -@Service(JMSService.class) -public class JMSServiceImpl implements JMSService { - - private JMSServiceCallback myServiceCallback; - - @Callback - public void setMyServiceCallback(JMSServiceCallback myServiceCallback) { - System.out.println("setMyServiceCallback on thread " + Thread.currentThread() + " cb: " + myServiceCallback); - this.myServiceCallback = myServiceCallback; - } - - public void someMethod(String arg) { - System.out.println("someMethod '" + arg + "' on thread " + Thread.currentThread()); - try { - myServiceCallback.receiveResult(arg + " -> receiveResult "); - } catch(Exception e) { - System.out.println("RuntimeException invoking receiveResult: " + e.toString()); - e.printStackTrace(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 95c3a41c43..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/jndi.properties deleted file mode 100644 index dec266b133..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/jndi.properties +++ /dev/null @@ -1,40 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.ServiceQueue = ServiceQueue -queue.ServiceQueue = TQServiceQueue -queue.CallbackQueue = CallbackQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/client.composite b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/client.composite deleted file mode 100644 index 19124fc3e6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/client.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/tempq.composite b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/tempq.composite deleted file mode 100644 index 5ef7c981f0..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/main/resources/simple/tempq.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java deleted file mode 100644 index 18911ad8b6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class CallbackTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - JMSClient client = node.getService(JMSClient.class, "ClientComponent"); - - client.aClientMethod(); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized(JMSClientImpl.lock) { - JMSClientImpl.lock.wait(5000); - } - - assertEquals(" -> someMethod -> receiveResult ", JMSClientImpl.result); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java b/branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java deleted file mode 100644 index b335add358..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import java.net.MalformedURLException; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class TempCallbackQTestCase { - - private Node node; - - @Before - public void init() throws MalformedURLException { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - JMSClient client = node.getService(JMSClient.class, "ClientComponent"); - - client.aClientMethod(); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized (JMSClientImpl.lock) { - JMSClientImpl.lock.wait(5000); - } - - assertEquals(" -> someMethod -> receiveResult ", JMSClientImpl.result); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/pom.xml b/branches/sca-java-2.0-M4/itest/jms/defaults/pom.xml deleted file mode 100644 index 3d85dbd021..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-defaults - Apache Tuscany SCA iTest JMS with Defaults - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldClientImpl implements HelloWorldService { - - private HelloWorldService serviceA; - - @Reference - public void setServiceA(HelloWorldService service) { - this.serviceA = service; - } - - public String sayHello(String name) { - return serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldService { - String sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - if ("bang".equals(name)) { - throw new RuntimeException("blem wit"); - } - return "jmsHello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2a74e465ea..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/client.composite b/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/client.composite deleted file mode 100644 index c4d5215f86..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/client.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/service.composite b/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/service.composite deleted file mode 100644 index a4de896f24..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/defaults/service.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java deleted file mode 100644 index d2b1a5fe59..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class DefaultsTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient"); - assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra")); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/pom.xml b/branches/sca-java-2.0-M4/itest/jms/definitions/pom.xml deleted file mode 100644 index 29bc1068a7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-definitions - Apache Tuscany SCA iTest JMS Tests For Properties - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - - org.apache.activemq - activemq-core - 5.2.0 - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the OneWay service. - */ -@Service(OneWayService.class) -public class OneWayClientImpl implements OneWayService { - - private OneWayService serviceA; - - @Reference - public void setServiceA(OneWayService service) { - this.serviceA = service; - } - - public void sayHello(String name) { - serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface OneWayService { - - @OneWay - void sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 6b763874df..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class OneWayServiceImpl implements OneWayService { - - public static Object lock = new Object(); - public static String name; - - public void sayHello(String name) { - OneWayServiceImpl.name = name; - synchronized (OneWayServiceImpl.lock) { - OneWayServiceImpl.lock.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 07caa57490..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions.xml b/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions.xml deleted file mode 100644 index 07b9f4aaa8..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions/definitions.composite b/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions/definitions.composite deleted file mode 100644 index 67a62a7165..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/definitions/definitions.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/jndi.properties deleted file mode 100644 index f7555e0beb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = MyConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.MyServiceQueue= MyServiceQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java deleted file mode 100644 index 729ad072b7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - */ -public class DefinitionsTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testSayHello() throws Exception { - OneWayService client = node.getService(OneWayService.class, "OneWayClient"); - - client.sayHello("petra"); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized(OneWayServiceImpl.lock) { - if (OneWayServiceImpl.name == null) { - OneWayServiceImpl.lock.wait(5000); - } - } - - assertEquals("petra", OneWayServiceImpl.name); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/pom.xml b/branches/sca-java-2.0-M4/itest/jms/exceptions/pom.xml deleted file mode 100644 index 06283c6b55..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-nonscaclient-exceptions - Apache Tuscany SCA iTest JMS NonSCA Client Exceptions - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - xmlunit - xmlunit - 1.2 - test - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java deleted file mode 100644 index 469882f3b3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetion extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetion(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java deleted file mode 100644 index 19b584950a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetion2Args extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetion2Args(String s, Throwable e) { - super(s, e); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java deleted file mode 100644 index b12e3a562e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetionChained extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetionChained(Throwable e) { - super(e); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java deleted file mode 100644 index b23db73c01..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetionNoArgs extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetionNoArgs() { - super(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java deleted file mode 100644 index 9e4c4c46d4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface ExceptionService { - - public void throwChecked() throws CheckedExcpetion; - public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs; - public void throwChecked2Args() throws CheckedExcpetion2Args; - public void throwCheckedChained() throws CheckedExcpetionChained; - - public void throwUnChecked(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java deleted file mode 100644 index 866acf1ce1..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class ExceptionServiceImpl implements ExceptionService { - - public void throwChecked() throws CheckedExcpetion { - throw new CheckedExcpetion("foo"); - } - - public void throwChecked2Args() throws CheckedExcpetion2Args { - throw new CheckedExcpetion2Args("foo", new Exception("bla")); - } - - public void throwCheckedChained() throws CheckedExcpetionChained { - throw new CheckedExcpetionChained(new Exception("bla")); - } - - public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs { - throw new CheckedExcpetionNoArgs(); - } - - public void throwUnChecked() { - throw new RuntimeException("bla"); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c9945cc57d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/exceptions/service.composite b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/exceptions/service.composite deleted file mode 100644 index 9eb8f2b27d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/exceptions/service.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/jndi.properties deleted file mode 100644 index 72d5457faf..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/main/resources/jndi.properties +++ /dev/null @@ -1,40 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.TextExceptionService = TextRequestQueue -queue.ObjectExceptionService = ObjectRequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java deleted file mode 100644 index 1e1a0987ad..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.IOException; -import java.util.Properties; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.Destination; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageProducer; -import javax.jms.ObjectMessage; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.xml.sax.SAXException; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class ExceptionsTestCase { - - private Node node; - private Session session; - private InitialContext context; - private Connection connection; - - private static final String CHECKED_XML = - "foo"; - private static final String CHECKED_NOARGS_XML = ""; - private static final String CHECKED_2ARGS_XML = - "foo"; - private static final String CHECKED_CHAINED_XML = - "java.lang.Exception: bla"; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testTextChecked() throws NamingException, JMSException, SAXException, IOException { - sendJMSTextRequest("throwChecked"); - Message m = receiveJMSResponse(); - assertXMLEqual(CHECKED_XML, ((TextMessage)m).getText()); - } - - @Test - public void testTextCheckedNoArgs() throws NamingException, JMSException, SAXException, IOException { - sendJMSTextRequest("throwCheckedNoArgs"); - Message m = receiveJMSResponse(); - assertXMLEqual(CHECKED_NOARGS_XML, ((TextMessage)m).getText()); - } - - @Test - public void testTextChecked2Args() throws NamingException, JMSException, SAXException, IOException { - sendJMSTextRequest("throwChecked2Args"); - Message m = receiveJMSResponse(); - assertXMLEqual(CHECKED_2ARGS_XML, ((TextMessage)m).getText()); - } - - @Test - public void testTextCheckedChained() throws NamingException, JMSException, SAXException, IOException { - sendJMSTextRequest("throwCheckedChained"); - Message m = receiveJMSResponse(); - assertXMLEqual(CHECKED_CHAINED_XML, ((TextMessage)m).getText()); - } - - @Test - public void testTextUnChecked() throws NamingException, JMSException, SAXException, IOException { - sendJMSTextRequest("throwUnChecked"); - Message m = receiveJMSResponse(); - - // FIXME: what should the response message be for unchecked exceptions with wireFormat.textXML??? - Object o = ((ObjectMessage)m).getObject(); - assertTrue(o instanceof RuntimeException); - assertTrue("java.lang.RuntimeException".equals(o.getClass().getName())); - assertEquals("java.lang.RuntimeException: bla", ((RuntimeException)o).getMessage()); - } - - @Test - public void testObjectChecked() throws NamingException, JMSException { - sendJMSObjectRequest("throwChecked"); - Message m = receiveJMSResponse(); - Object o = ((ObjectMessage)m).getObject(); - assertTrue(o instanceof CheckedExcpetion); - assertEquals("foo", ((CheckedExcpetion)o).getMessage()); - } - - @Test - public void testObjectCheckedNoArgs() throws NamingException, JMSException { - sendJMSObjectRequest("throwCheckedNoArgs"); - Message m = receiveJMSResponse(); - Object o = ((ObjectMessage)m).getObject(); - assertTrue(o instanceof CheckedExcpetionNoArgs); - } - - @Test - public void testObjectChecked2Args() throws NamingException, JMSException { - sendJMSObjectRequest("throwChecked2Args"); - Message m = receiveJMSResponse(); - Object o = ((ObjectMessage)m).getObject(); - assertTrue(o instanceof CheckedExcpetion2Args); - assertEquals("foo", ((CheckedExcpetion2Args)o).getMessage()); - assertEquals("bla", ((CheckedExcpetion2Args)o).getCause().getMessage()); - } - - @Test - public void testObjectCheckedChained() throws NamingException, JMSException { - sendJMSObjectRequest("throwCheckedChained"); - Message m = receiveJMSResponse(); - Object o = ((ObjectMessage)m).getObject(); - assertTrue(o instanceof CheckedExcpetionChained); - assertEquals("bla", ((CheckedExcpetionChained)o).getCause().getMessage()); - } - - @Test - public void testObjectUnChecked() throws NamingException, JMSException { - sendJMSObjectRequest("throwUnChecked"); - Message m = receiveJMSResponse(); - Object o = ((ObjectMessage)m).getObject(); - assertTrue(o instanceof RuntimeException); - assertTrue("java.lang.RuntimeException".equals(o.getClass().getName())); - assertEquals("java.lang.RuntimeException: bla", ((RuntimeException)o).getMessage()); - } - - @After - public void end() throws JMSException { - if (node != null) { - node.stop(); - } - if (connection != null) { - connection.close(); - } - } - - private void sendJMSTextRequest(String operationName) throws NamingException, JMSException { - context = new InitialContext(new Properties()); - ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory"); - connection = cf.createConnection(); - connection.start(); - - session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - Destination toDest = (Destination)context.lookup("TextExceptionService"); - - TextMessage m = session.createTextMessage(); - m.setStringProperty("scaOperationName", operationName); - m.setJMSReplyTo((Destination)context.lookup("ResponseQueue")); - m.setText("<_ns_:" + operationName + " xmlns:_ns_=\"http://jms.binding.sca.tuscany.apache.org/\" />"); - - MessageProducer producer = session.createProducer(toDest); - producer.send(m); - } - - private void sendJMSObjectRequest(String operationName) throws NamingException, JMSException { - context = new InitialContext(new Properties()); - ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory"); - connection = cf.createConnection(); - connection.start(); - - session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - Destination toDest = (Destination)context.lookup("ObjectExceptionService"); - - ObjectMessage m = session.createObjectMessage(); - m.setStringProperty("scaOperationName", operationName); - m.setJMSReplyTo((Destination)context.lookup("ResponseQueue")); - m.setObject(new Object[0]); - - MessageProducer producer = session.createProducer(toDest); - producer.send(m); - } - - private Message receiveJMSResponse() throws NamingException, JMSException { - Destination replyDest = (Destination)context.lookup("ResponseQueue"); - MessageConsumer consumer = session.createConsumer(replyDest); - Message m = consumer.receive(5000); - if (m == null) { - throw new RuntimeException("No reply message received"); - } - return m; - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/pom.xml b/branches/sca-java-2.0-M4/itest/jms/exceptions1/pom.xml deleted file mode 100644 index c7c4fac108..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-exceptions1 - Apache Tuscany SCA iTest JMS with Exceptions1 - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java deleted file mode 100644 index 469882f3b3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetion extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetion(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java deleted file mode 100644 index 19b584950a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetion2Args extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetion2Args(String s, Throwable e) { - super(s, e); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java deleted file mode 100644 index b12e3a562e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetionChained extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetionChained(Throwable e) { - super(e); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java deleted file mode 100644 index b23db73c01..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class CheckedExcpetionNoArgs extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedExcpetionNoArgs() { - super(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java deleted file mode 100644 index 9e4c4c46d4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface ExceptionService { - - public void throwChecked() throws CheckedExcpetion; - public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs; - public void throwChecked2Args() throws CheckedExcpetion2Args; - public void throwCheckedChained() throws CheckedExcpetionChained; - - public void throwUnChecked(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java deleted file mode 100644 index 02426936d2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(ExceptionService.class) -public class ExceptionServiceClient implements ExceptionService { - - private ExceptionService service; - - @Reference - public void setService(ExceptionService service) { - this.service = service; - } - - public void throwChecked() throws CheckedExcpetion { - service.throwChecked(); - } - - public void throwChecked2Args() throws CheckedExcpetion2Args { - service.throwChecked2Args(); - } - - public void throwCheckedChained() throws CheckedExcpetionChained { - service.throwCheckedChained(); - } - - public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs { - service.throwCheckedNoArgs(); - } - - public void throwUnChecked() { - service.throwUnChecked(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java deleted file mode 100644 index 866acf1ce1..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class ExceptionServiceImpl implements ExceptionService { - - public void throwChecked() throws CheckedExcpetion { - throw new CheckedExcpetion("foo"); - } - - public void throwChecked2Args() throws CheckedExcpetion2Args { - throw new CheckedExcpetion2Args("foo", new Exception("bla")); - } - - public void throwCheckedChained() throws CheckedExcpetionChained { - throw new CheckedExcpetionChained(new Exception("bla")); - } - - public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs { - throw new CheckedExcpetionNoArgs(); - } - - public void throwUnChecked() { - throw new RuntimeException("bla"); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c28c94da98..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/client.composite b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/client.composite deleted file mode 100644 index 5d1c57a1f3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/client.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/service.composite b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/service.composite deleted file mode 100644 index 6875772d56..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/exceptions/service.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java deleted file mode 100644 index 170e28b15d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class ExceptionsTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testChecked() { - ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient"); - try { - service.throwChecked(); - fail(); - } catch (CheckedExcpetion e) { - assertEquals("foo", e.getMessage()); - } catch (Throwable e) { - fail(); - } - } - - @Test - public void testCheckedNoArgs() { - ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient"); - try { - service.throwCheckedNoArgs(); - fail(); - } catch (CheckedExcpetionNoArgs e) { - // ok - } - } - - @Test - public void testChecked2Args() { - ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient"); - try { - service.throwChecked2Args(); - fail(); - } catch (CheckedExcpetion2Args e) { - assertEquals("foo", e.getMessage()); -// FIXME: TUSCANY-2848: lost the cause! -// assertNotNull(e.getCause()); -// assertEquals("bla", e.getCause().getMessage()); - } - } - - @Test - public void testCheckedChained() { - ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient"); - try { - service.throwCheckedChained(); - fail(); - } catch (CheckedExcpetionChained e) { - // FIXME: TUSCANY-2848: lost the cause! -// assertNotNull(e.getCause()); -// assertEquals("bla", e.getCause().getMessage()); - } - } - - @Test - public void testUnChecked() { - ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient"); - try { - service.throwUnChecked(); - fail(); - } catch (Exception e) { - assertEquals("java.lang.RuntimeException: bla", e.getCause().getMessage()); - } - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/pom.xml b/branches/sca-java-2.0-M4/itest/jms/externalBroker/pom.xml deleted file mode 100644 index b256fc1488..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-external-broker - Apache Tuscany SCA iTest JMS with External JMS Broker - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldClientImpl implements HelloWorldService { - - private HelloWorldService serviceA; - - @Reference - public void setServiceA(HelloWorldService service) { - this.serviceA = service; - } - - public String sayHello(String name) { - return serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldService { - String sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - if ("bang".equals(name)) { - throw new RuntimeException("blem wit"); - } - return "jmsHello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 60b132ca1b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/client.composite b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/client.composite deleted file mode 100644 index cad76ef45f..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/client.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/service.composite b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/service.composite deleted file mode 100644 index 8a76d8cd29..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/external/service.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java b/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java deleted file mode 100644 index b8cbde7b26..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests using the JMS binding with an external JMS broker - */ -public class ExternalBrokerTestCase { - - private static Node node; - private BrokerService broker; - - @Before - public void init() throws Exception { - startBroker(); - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient"); - assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra")); - } - - @After - public void end() throws Exception { - if (node != null) { - node.stop(); - } - stopBroker(); - } - - protected void startBroker() throws Exception { - broker = new BrokerService(); - broker.setPersistent(false); - broker.setUseJmx(false); - broker.addConnector("tcp://localhost:61616"); - broker.start(); - } - protected void stopBroker() throws Exception { - if (broker != null) { - broker.stop(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/pom.xml deleted file mode 100644 index abe5f116e7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmsbytes - Apache Tuscany SCA iTest JMS Message Format jmsbytes - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite deleted file mode 100644 index e5a904871c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java deleted file mode 100644 index 49cb0a69ab..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSBytesTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - System.out.println(helloWorldService.getGreetings("Fred Bloggs")); -/* TUSCANY-2967 - disable this change while we decide what to do and - * return faults as JMSObject messages to be consistent - * again with other wire formats - assertEquals("Hello Fred Bloggs " + - "org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.CheckedException: foo " + - "org.osoa.sca.ServiceRuntimeException: java.lang.RuntimeException: bla", - helloWorldService.getGreetings("Fred Bloggs")); -*/ - assertEquals("Hello Fred Bloggs " + - "foo " + - "remote service exception, see nested exception" , - helloWorldService.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/pom.xml deleted file mode 100644 index a816f8a234..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmsbytesxml - Apache Tuscany SCA iTest JMS Message Format jmsbytesxml - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java deleted file mode 100644 index 1684c19c50..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java deleted file mode 100644 index cc7b7b11e4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3742bd6ac6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java deleted file mode 100644 index eae95b4201..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index a37a03d994..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite deleted file mode 100644 index a28e6e5f6d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java deleted file mode 100644 index 53498ce44d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSBytesXMLTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - System.out.println(helloWorldService.getGreetings("Fred Bloggs")); - assertEquals("Hello Fred Bloggs foo remote service exception, see nested exception", helloWorldService.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/pom.xml deleted file mode 100644 index 36e27c2f63..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmsdefault - Apache Tuscany SCA iTest JMS Message Format jmsdefault - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java deleted file mode 100644 index 530eac3d00..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java deleted file mode 100644 index 1768816247..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - - public String getPersonGreetings(Person person); - - public void nullInVoidOut(); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index d0a5faaef7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - @Reference - protected HelloWorldService helloWorldService2; - - @Reference - protected HelloWorldService helloWorldService3; - - @Reference - protected HelloWorldService helloWorldService4; - - public String getGreetings(String name){ - String stringValue = helloWorldService1.getGreetings(name) + " " + - helloWorldService2.getGreetings(name) + " " + - helloWorldService3.getGreetings(name) + " " + - helloWorldService4.getGreetings(name); - - try { - helloWorldService3.throwChecked(name); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService3.throwUnChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService4.throwChecked(name); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService4.throwUnChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - return stringValue; - } - - public String getPersonGreetings(Person person){ - return helloWorldService1.getPersonGreetings(person) + " " + - helloWorldService2.getPersonGreetings(person) + " " + - helloWorldService3.getPersonGreetings(person) + " " + - helloWorldService4.getPersonGreetings(person); - } - - public void nullInVoidOut() { - helloWorldService1.nullInVoidOut(); - helloWorldService2.nullInVoidOut(); - helloWorldService3.nullInVoidOut(); - helloWorldService4.nullInVoidOut(); - - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java deleted file mode 100644 index 204863423d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -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); - - public String getPersonGreetings(Person person); - - public void nullInVoidOut(); - - public void throwChecked(String msg) throws CheckedException; - public void throwUnChecked(String msg); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b143079fe3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public static int nullInVoidOutCalled = 0; - - public String getGreetings(String name){ - String response = "Hello " + name; - System.out.println("getGreetings: " + response); - return response; - } - - public String getPersonGreetings(Person person){ - String response = "Hello " + person.getFirstName() + " " + person.getLastName(); - System.out.println("getPersonGreetings: " + response); - return response; - } - - public void nullInVoidOut() { - System.out.println("nullInVoidOut"); - nullInVoidOutCalled++; - } - - public void throwChecked(String msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(String msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java deleted file mode 100644 index b62d1b1f1d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -public class Person { - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite deleted file mode 100644 index a6d6e04ac8..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl deleted file mode 100644 index 935a2e73c5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java deleted file mode 100644 index 78c0239f0d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl; -import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.Person; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSDefaultTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs foo remote service exception, see nested exception foo remote service exception, see nested exception", helloWorldService.getGreetings("Fred Bloggs")); - - Person person = new Person(); - person.setFirstName("Fred"); - person.setLastName("Bloggs"); - assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getPersonGreetings(person)); - - // this just makes sure that there are no exceptions thrown for this case - helloWorldService.nullInVoidOut(); - Assert.assertEquals(4, HelloWorldServiceImpl.nullInVoidOutCalled); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/pom.xml deleted file mode 100644 index 5014c594b6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmsmessage - Apache Tuscany SCA iTest JMS Message Format jmsmessage - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java deleted file mode 100644 index 490bd5d4a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 5aed6b12d7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReferenceSide helloWorldService1; - - public String getGreetings(String name){ - helloWorldService1.getGreetings(name); - - try { - Thread.sleep(2000); - } catch (Exception ex) { - // do nothing - } - - return HelloWorldServiceImpl.getGreetings(); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java deleted file mode 100644 index efe2f1a4dc..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - @OneWay - public void onMessage(javax.jms.Message message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index c1011ce6fb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import javax.jms.TextMessage; - -public class HelloWorldServiceImpl implements HelloWorldService { - - private static String greetings = "not set"; - - public void onMessage(javax.jms.Message message){ - - String name = null; - - try { - name = ((TextMessage)message).getText(); - } catch (Exception ex) { - name = "EXCEPTION"; - } - greetings = "Hello " + name; - } - - public static String getGreetings(){ - return greetings; - } - - // javax.jms.BytesMessage - // javax.jms.MapMessage - // javax.jms.ObjectMessage - // javax.jms.StreamMessage - // javax.jms.TextMessage - - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java deleted file mode 100644 index d863b3a0a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import javax.jws.soap.SOAPBinding; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReferenceSide { - - @OneWay - @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE) - public void getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README deleted file mode 100644 index 0f7a730b91..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README +++ /dev/null @@ -1,3 +0,0 @@ -This test uses an SCA composite to fake a scenario where the reference is an SCA reference but the -service is a non-SCA JMS endpoint. This gives us the opportunity to play about with the interface -configuration at the reference to see how the contents of the JMS message can be controlled. \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite deleted file mode 100644 index c624a11233..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl deleted file mode 100644 index f72ce434fa..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java deleted file mode 100644 index f47031da10..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSMessageTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - System.out.println(helloWorldService.getGreetings("Fred Bloggs")); - assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/pom.xml deleted file mode 100644 index 66216aeeec..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmsobject - Apache Tuscany SCA iTest JMS Message Format jmsobject - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java deleted file mode 100644 index a1c38f7295..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java deleted file mode 100644 index 3b34dbae85..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetingsWrapSingle(String firstName, String lastName); - public String getGreetingsDontWrapSingle(String firstName, String lastName); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 443d2aa746..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldServiceWrapSingle; - - @Reference - protected HelloWorldService helloWorldServiceDontWrapSingle; - - public String getGreetingsWrapSingle(String firstName, String lastName){ - Person person = new Person(); - person.setFirstName(firstName); - person.setLastName(lastName); - - String returnString = ""; - - Person returnPerson = helloWorldServiceWrapSingle.getPersonGreetings(person); - returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName(); - - Person returnNullPerson = helloWorldServiceWrapSingle.getNullReturnGreetings(person); - - if (returnNullPerson == null){ - returnString += " Hello2 null"; - } - - String returnGreeting = helloWorldServiceWrapSingle.getArrayGreeting(new String[]{firstName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getMultiGreetings(firstName, lastName); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getObjectGreeting(person); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getObjectArrayGreeting(new Object[]{person}); - returnString += " " + returnGreeting; - - return returnString; - } - - public String getGreetingsDontWrapSingle(String firstName, String lastName){ - Person person = new Person(); - person.setFirstName(firstName); - person.setLastName(lastName); - - String returnString = ""; - - Person returnPerson = helloWorldServiceDontWrapSingle.getPersonGreetings(person); - returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName(); - - Person returnNullPerson = helloWorldServiceDontWrapSingle.getNullReturnGreetings(person); - - if (returnNullPerson == null){ - returnString += " Hello2 null"; - } - - String returnGreeting = helloWorldServiceDontWrapSingle.getArrayGreeting(new String[]{firstName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getMultiGreetings(firstName, lastName); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getObjectGreeting(person); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getObjectArrayGreeting(new Object[]{person}); - returnString += " " + returnGreeting; - - try { - helloWorldServiceDontWrapSingle.throwChecked(person); - } catch (CheckedException e) { - returnString += " " + e.getMessage(); - } - - try { - helloWorldServiceDontWrapSingle.throwUnChecked(person); - } catch (Exception e) { - returnString += " " + e.getCause().getMessage(); - } - - return returnString; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java deleted file mode 100644 index b179a86f52..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public Person getPersonGreetings(Person person); - public Person getNullReturnGreetings(Person person); - public String getArrayGreeting(String[] names); - public String getMultiArrayGreetings(String[] firstName, String[] lastName); - public String getMultiGreetings(String firstName, String lastName); - public String getObjectGreeting(Object person); - public String getObjectArrayGreeting(Object[] pearson); - - public void throwChecked(Person person) throws CheckedException; - public void throwUnChecked(Person person); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index fa9e9eb1cb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public Person getPersonGreetings(Person person){ - - person.setFirstName("Hello1 " + person.getFirstName()); - person.setLastName("Hello1 " + person.getLastName()); - - return person; - } - - public Person getNullReturnGreetings(Person person){ - return null; - } - - public String getArrayGreeting(String[] names) { - return "Hello3 " + names[0]; - } - - public String getMultiArrayGreetings(String[] firstName, String[] lastName) { - return "Hello4 " + firstName[0] + " " + lastName[0]; - } - - public String getMultiGreetings(String firstName, String lastName) { - return "Hello5 " + firstName + " " + lastName; - } - - public String getObjectGreeting(Object person) { - return "Hello6 " + ((Person)person).getFirstName() + " " + ((Person)person).getLastName(); - } - - public String getObjectArrayGreeting(Object[] person) { - return "Hello7 " + ((Person)person[0]).getFirstName() + " " + ((Person)person[0]).getLastName(); - } - - public void throwChecked(Person person) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(Person person) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java deleted file mode 100644 index 29233d74a9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import java.io.Serializable; - -public class Person implements Serializable { - - private static final long serialVersionUID = -6842761353978551779L; - - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite deleted file mode 100644 index e037aa74d9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl deleted file mode 100644 index 4625f46578..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.wsdl +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java deleted file mode 100644 index c9609119c9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSObjectTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs", - helloWorldService.getGreetingsWrapSingle("Fred", "Bloggs")); - - assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs foo java.lang.RuntimeException: bla", - helloWorldService.getGreetingsDontWrapSingle("Fred", "Bloggs")); - - } - - @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"); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/pom.xml deleted file mode 100644 index 8a34f85c33..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmstext - Apache Tuscany SCA iTest JMS Message Format jmstext - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java deleted file mode 100644 index 57ad23e064..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java deleted file mode 100644 index ea8d5ffd28..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index afcd391009..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - public String getGreetings(String name){ - String stringValue = helloWorldService1.getStringGreetings(name); - - try { - helloWorldService1.throwChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java deleted file mode 100644 index 8af585c13c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getStringGreetings(String msg); - - public void throwChecked(String msg) throws CheckedException; - public void throwUnChecked(String msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 4f0a6fe4c5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getStringGreetings(String msg){ - - msg = "Hello " + msg; - return msg; - } - - public void throwChecked(String msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(String msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index a8dd686725..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public String getStringGreetings(String msg); - - public void throwChecked(String msg) ; - public void throwUnChecked(String msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite deleted file mode 100644 index d700a92f20..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java deleted file mode 100644 index b887aa18fd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSTextTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - System.out.println(helloWorldService.getGreetings("Fred Bloggs")); - assertEquals("Hello Fred Bloggs " + - "foo remote service exception, see nested exception", - helloWorldService.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/pom.xml deleted file mode 100644 index a792f6c608..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmstextxml - Apache Tuscany SCA iTest JMS Message Format jmstextxml - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java deleted file mode 100644 index 5e9a7a316e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java deleted file mode 100644 index 768b293380..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - public String getPersonGreetings(Person person); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 2bac5db5ab..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - @Reference - protected HelloWorldService helloWorldService2; - - @Reference - protected HelloWorldService helloWorldService3; - - public String getGreetings(String name){ - String stringValue = helloWorldService1.getGreetings(name) + " " + - helloWorldService2.getGreetings(name) + " " + - helloWorldService3.getGreetings(name); - - return stringValue; - } - - public String getPersonGreetings(Person person){ - String stringValue = helloWorldService1.getPersonGreetings(person) + " " + - helloWorldService2.getPersonGreetings(person) + " " + - helloWorldService3.getPersonGreetings(person); - - try { - helloWorldService1.throwChecked(person.getLastName()); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService1.throwUnChecked(person.getLastName()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java deleted file mode 100644 index be2af78958..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -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); - public String getPersonGreetings(Person person); - - public void throwChecked(String msg) throws CheckedException; - public void throwUnChecked(String msg); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index e85d4ca5a4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getGreetings(String name){ - String response = "Hello " + name; - System.out.println("getGreetings: " + response); - return response; - } - - public String getPersonGreetings(Person person){ - String response = "Hello " + person.getFirstName() + " " + person.getLastName(); - System.out.println("getPersonGreetings: " + response); - return response; - } - - public void throwChecked(String msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(String msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java deleted file mode 100644 index 175b482c81..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -public class Person { - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite deleted file mode 100644 index 72e7646704..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl deleted file mode 100644 index 53db66ea7e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java deleted file mode 100644 index 6054050a5d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldReference; -import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.Person; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSTextXMLTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs")); - - Person person = new Person(); - person.setFirstName("Fred"); - person.setLastName("Bloggs"); - assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs foo remote service exception, see nested exception", helloWorldService.getPersonGreetings(person)); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml deleted file mode 100644 index 38b53d7f73..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-format-jmstextxmlinjmsobjectout - Apache Tuscany SCA iTest JMS Message Format jmstextxmlinjmsobjectout - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java deleted file mode 100644 index 1acbfbd5ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java deleted file mode 100644 index 2d19d4bd82..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3ccd54e9bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReference helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (Exception e) { - // Test to see what happens if we talk to a service - // that declares a checked exception through an - // interface that doesn't - stringValue += " " + e.getCause().getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java deleted file mode 100644 index b9a1ffd5ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b92959cfd3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index ff5cf617f2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) ; - public void throwUnChecked(byte[] msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java deleted file mode 100644 index 1684c19c50..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java deleted file mode 100644 index cc7b7b11e4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 3742bd6ac6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - public String getGreetings(String name){ - byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes()); - String stringValue = new String(bytesValue); - - try { - helloWorldService1.throwChecked(name.getBytes()); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name.getBytes()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java deleted file mode 100644 index eae95b4201..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg); - - public void throwChecked(byte[] msg) throws CheckedException; - public void throwUnChecked(byte[] msg); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index a37a03d994..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public byte[] getByteArrayGreetings(byte[] msg){ - - String name = new String(msg); - name = "Hello " + name; - - return name.getBytes(); - } - - public void throwChecked(byte[] msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(byte[] msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java deleted file mode 100644 index 530eac3d00..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java deleted file mode 100644 index 1768816247..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - - public String getPersonGreetings(Person person); - - public void nullInVoidOut(); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index d0a5faaef7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - @Reference - protected HelloWorldService helloWorldService2; - - @Reference - protected HelloWorldService helloWorldService3; - - @Reference - protected HelloWorldService helloWorldService4; - - public String getGreetings(String name){ - String stringValue = helloWorldService1.getGreetings(name) + " " + - helloWorldService2.getGreetings(name) + " " + - helloWorldService3.getGreetings(name) + " " + - helloWorldService4.getGreetings(name); - - try { - helloWorldService3.throwChecked(name); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService3.throwUnChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService4.throwChecked(name); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService4.throwUnChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - return stringValue; - } - - public String getPersonGreetings(Person person){ - return helloWorldService1.getPersonGreetings(person) + " " + - helloWorldService2.getPersonGreetings(person) + " " + - helloWorldService3.getPersonGreetings(person) + " " + - helloWorldService4.getPersonGreetings(person); - } - - public void nullInVoidOut() { - helloWorldService1.nullInVoidOut(); - helloWorldService2.nullInVoidOut(); - helloWorldService3.nullInVoidOut(); - helloWorldService4.nullInVoidOut(); - - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java deleted file mode 100644 index 204863423d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -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); - - public String getPersonGreetings(Person person); - - public void nullInVoidOut(); - - public void throwChecked(String msg) throws CheckedException; - public void throwUnChecked(String msg); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index b143079fe3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public static int nullInVoidOutCalled = 0; - - public String getGreetings(String name){ - String response = "Hello " + name; - System.out.println("getGreetings: " + response); - return response; - } - - public String getPersonGreetings(Person person){ - String response = "Hello " + person.getFirstName() + " " + person.getLastName(); - System.out.println("getPersonGreetings: " + response); - return response; - } - - public void nullInVoidOut() { - System.out.println("nullInVoidOut"); - nullInVoidOutCalled++; - } - - public void throwChecked(String msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(String msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java deleted file mode 100644 index b62d1b1f1d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld; - -public class Person { - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java deleted file mode 100644 index 490bd5d4a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 5aed6b12d7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldServiceReferenceSide helloWorldService1; - - public String getGreetings(String name){ - helloWorldService1.getGreetings(name); - - try { - Thread.sleep(2000); - } catch (Exception ex) { - // do nothing - } - - return HelloWorldServiceImpl.getGreetings(); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java deleted file mode 100644 index efe2f1a4dc..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - @OneWay - public void onMessage(javax.jms.Message message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index c1011ce6fb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import javax.jms.TextMessage; - -public class HelloWorldServiceImpl implements HelloWorldService { - - private static String greetings = "not set"; - - public void onMessage(javax.jms.Message message){ - - String name = null; - - try { - name = ((TextMessage)message).getText(); - } catch (Exception ex) { - name = "EXCEPTION"; - } - greetings = "Hello " + name; - } - - public static String getGreetings(){ - return greetings; - } - - // javax.jms.BytesMessage - // javax.jms.MapMessage - // javax.jms.ObjectMessage - // javax.jms.StreamMessage - // javax.jms.TextMessage - - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java deleted file mode 100644 index d863b3a0a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld; - -import javax.jws.soap.SOAPBinding; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReferenceSide { - - @OneWay - @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE) - public void getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README deleted file mode 100644 index 0f7a730b91..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README +++ /dev/null @@ -1,3 +0,0 @@ -This test uses an SCA composite to fake a scenario where the reference is an SCA reference but the -service is a non-SCA JMS endpoint. This gives us the opportunity to play about with the interface -configuration at the reference to see how the contents of the JMS message can be controlled. \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java deleted file mode 100644 index a1c38f7295..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java deleted file mode 100644 index 3b34dbae85..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetingsWrapSingle(String firstName, String lastName); - public String getGreetingsDontWrapSingle(String firstName, String lastName); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 443d2aa746..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldServiceWrapSingle; - - @Reference - protected HelloWorldService helloWorldServiceDontWrapSingle; - - public String getGreetingsWrapSingle(String firstName, String lastName){ - Person person = new Person(); - person.setFirstName(firstName); - person.setLastName(lastName); - - String returnString = ""; - - Person returnPerson = helloWorldServiceWrapSingle.getPersonGreetings(person); - returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName(); - - Person returnNullPerson = helloWorldServiceWrapSingle.getNullReturnGreetings(person); - - if (returnNullPerson == null){ - returnString += " Hello2 null"; - } - - String returnGreeting = helloWorldServiceWrapSingle.getArrayGreeting(new String[]{firstName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getMultiGreetings(firstName, lastName); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getObjectGreeting(person); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceWrapSingle.getObjectArrayGreeting(new Object[]{person}); - returnString += " " + returnGreeting; - - return returnString; - } - - public String getGreetingsDontWrapSingle(String firstName, String lastName){ - Person person = new Person(); - person.setFirstName(firstName); - person.setLastName(lastName); - - String returnString = ""; - - Person returnPerson = helloWorldServiceDontWrapSingle.getPersonGreetings(person); - returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName(); - - Person returnNullPerson = helloWorldServiceDontWrapSingle.getNullReturnGreetings(person); - - if (returnNullPerson == null){ - returnString += " Hello2 null"; - } - - String returnGreeting = helloWorldServiceDontWrapSingle.getArrayGreeting(new String[]{firstName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName}); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getMultiGreetings(firstName, lastName); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getObjectGreeting(person); - returnString += " " + returnGreeting; - - returnGreeting = helloWorldServiceDontWrapSingle.getObjectArrayGreeting(new Object[]{person}); - returnString += " " + returnGreeting; - - try { - helloWorldServiceDontWrapSingle.throwChecked(person); - } catch (CheckedException e) { - returnString += " " + e.getMessage(); - } - - try { - helloWorldServiceDontWrapSingle.throwUnChecked(person); - } catch (Exception e) { - returnString += " " + e.getCause().getMessage(); - } - - return returnString; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java deleted file mode 100644 index b179a86f52..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public Person getPersonGreetings(Person person); - public Person getNullReturnGreetings(Person person); - public String getArrayGreeting(String[] names); - public String getMultiArrayGreetings(String[] firstName, String[] lastName); - public String getMultiGreetings(String firstName, String lastName); - public String getObjectGreeting(Object person); - public String getObjectArrayGreeting(Object[] pearson); - - public void throwChecked(Person person) throws CheckedException; - public void throwUnChecked(Person person); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index fa9e9eb1cb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public Person getPersonGreetings(Person person){ - - person.setFirstName("Hello1 " + person.getFirstName()); - person.setLastName("Hello1 " + person.getLastName()); - - return person; - } - - public Person getNullReturnGreetings(Person person){ - return null; - } - - public String getArrayGreeting(String[] names) { - return "Hello3 " + names[0]; - } - - public String getMultiArrayGreetings(String[] firstName, String[] lastName) { - return "Hello4 " + firstName[0] + " " + lastName[0]; - } - - public String getMultiGreetings(String firstName, String lastName) { - return "Hello5 " + firstName + " " + lastName; - } - - public String getObjectGreeting(Object person) { - return "Hello6 " + ((Person)person).getFirstName() + " " + ((Person)person).getLastName(); - } - - public String getObjectArrayGreeting(Object[] person) { - return "Hello7 " + ((Person)person[0]).getFirstName() + " " + ((Person)person[0]).getLastName(); - } - - public void throwChecked(Person person) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(Person person) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java deleted file mode 100644 index 29233d74a9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld; - -import java.io.Serializable; - -public class Person implements Serializable { - - private static final long serialVersionUID = -6842761353978551779L; - - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java deleted file mode 100644 index 57ad23e064..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java deleted file mode 100644 index ea8d5ffd28..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String message); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index afcd391009..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - public String getGreetings(String name){ - String stringValue = helloWorldService1.getStringGreetings(name); - - try { - helloWorldService1.throwChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService1.throwUnChecked(name); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java deleted file mode 100644 index 8af585c13c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getStringGreetings(String msg); - - public void throwChecked(String msg) throws CheckedException; - public void throwUnChecked(String msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 4f0a6fe4c5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getStringGreetings(String msg){ - - msg = "Hello " + msg; - return msg; - } - - public void throwChecked(String msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(String msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java deleted file mode 100644 index a8dd686725..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldServiceReference { - - public String getStringGreetings(String msg); - - public void throwChecked(String msg) ; - public void throwUnChecked(String msg); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java deleted file mode 100644 index 5e9a7a316e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -public class CheckedException extends Exception { - private static final long serialVersionUID = 1L; - - public CheckedException(String s) { - super(s); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java deleted file mode 100644 index 768b293380..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - public String getPersonGreetings(Person person); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 2bac5db5ab..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - @Reference - protected HelloWorldService helloWorldService2; - - @Reference - protected HelloWorldService helloWorldService3; - - public String getGreetings(String name){ - String stringValue = helloWorldService1.getGreetings(name) + " " + - helloWorldService2.getGreetings(name) + " " + - helloWorldService3.getGreetings(name); - - return stringValue; - } - - public String getPersonGreetings(Person person){ - String stringValue = helloWorldService1.getPersonGreetings(person) + " " + - helloWorldService2.getPersonGreetings(person) + " " + - helloWorldService3.getPersonGreetings(person); - - try { - helloWorldService1.throwChecked(person.getLastName()); - } catch (CheckedException e) { - stringValue += " " + e.getMessage(); - } - - try { - helloWorldService1.throwUnChecked(person.getLastName()); - } catch (Exception e) { - stringValue += " " + e.getMessage(); - } - - return stringValue; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java deleted file mode 100644 index be2af78958..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -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); - public String getPersonGreetings(Person person); - - public void throwChecked(String msg) throws CheckedException; - public void throwUnChecked(String msg); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index e85d4ca5a4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getGreetings(String name){ - String response = "Hello " + name; - System.out.println("getGreetings: " + response); - return response; - } - - public String getPersonGreetings(Person person){ - String response = "Hello " + person.getFirstName() + " " + person.getLastName(); - System.out.println("getPersonGreetings: " + response); - return response; - } - - public void throwChecked(String msg) throws CheckedException { - throw new CheckedException("foo"); - } - - public void throwUnChecked(String msg) { - throw new RuntimeException("bla"); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java deleted file mode 100644 index 175b482c81..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld; - -public class Person { - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java deleted file mode 100644 index 7bb33ae270..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldService { - - @Reference - protected HelloWorldService helloWorldService1; - - public String getGreetings(String name){ - return helloWorldService1.getGreetings(name).toString(); - } - - public String getPersonGreetings(Person person){ - return helloWorldService1.getPersonGreetings(person).toString(); - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java deleted file mode 100644 index 9f955c278a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld; - -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); - - public String getPersonGreetings(Person person); -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java deleted file mode 100644 index 7c1cce6087..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getGreetings(String name){ - String response = "Hello " + name; - System.out.println("getGreetings: " + response); - return response; - } - - public String getPersonGreetings(Person person){ - String response = "Hello " + person.getFirstName() + " " + person.getLastName(); - System.out.println("getPersonGreetings: " + response); - return response; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java deleted file mode 100644 index 3d41f656f9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld; - -public class Person { - String firstName; - String lastName; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 84ac2356db..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite deleted file mode 100644 index b8bc67d5e3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl deleted file mode 100644 index 935a2e73c5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java b/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java deleted file mode 100644 index 8fc3d77cb3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.format; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldService; -import org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.Person; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class FormatJMSTextXMLInJMSObjectOutTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldReferenceComponent"); - - assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs")); - - Person person = new Person(); - person.setFirstName("Fred"); - person.setLastName("Bloggs"); - assertEquals("Hello Fred Bloggs", helloWorldService.getPersonGreetings(person)); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/pom.xml b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/pom.xml deleted file mode 100644 index 38f757160f..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-non-sca-client-broker - Apache Tuscany SCA iTest JMS with Non SCA Client - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java deleted file mode 100644 index 9083ba1d9c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface OneWayObjectService { - - @OneWay - void sayHello(Object name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java deleted file mode 100644 index 3149f99a25..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class OneWayObjectServiceImpl implements OneWayObjectService { - - public static Object mutex = new Object(); - public static Object name; - - public void sayHello(Object name) { - OneWayObjectServiceImpl.name = name; - synchronized (OneWayObjectServiceImpl.mutex) { - OneWayObjectServiceImpl.mutex.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface OneWayService { - - @OneWay - void sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class OneWayServiceImpl implements OneWayService { - - public static Object mutex = new Object(); - public static String name; - - public void sayHello(String name) { - OneWayServiceImpl.name = name; - synchronized (OneWayServiceImpl.mutex) { - OneWayServiceImpl.mutex.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 90106d2cbf..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite deleted file mode 100644 index 967754b6e4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java b/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java deleted file mode 100644 index 54cfdeb273..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import java.io.Serializable; -import java.util.HashSet; -import java.util.Set; - -import javax.jms.JMSException; -import javax.jms.MessageProducer; -import javax.jms.Session; -import javax.naming.NamingException; - -import org.apache.activemq.broker.BrokerService; -import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory; -import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryImpl; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class NonSCAClientTestCase { - - private static Node node; - - @Before - public void init() throws Exception { - startBroker(); - node = NodeFactory.newInstance().createNode().start(); - } - - @After - public void end() throws Exception { - if (node != null) { - node.stop(); - } - stopBroker(); - } - - - @Test - public void testXMLText() throws Exception { - - synchronized (OneWayServiceImpl.mutex) { - - sendTextMessage("dynamicQueues/OneWayService", "Petra"); - - // wait up to 10 seconds but it will likely be a lot less - // as the service invocation will wake this up earlier - if (OneWayServiceImpl.name == null) { - OneWayServiceImpl.mutex.wait(10000); - } - } - assertEquals("Petra", OneWayServiceImpl.name); - } - - @Test - public void testText() throws Exception { - - synchronized (OneWayServiceImpl.mutex) { - - sendTextMessage("dynamicQueues/TextDest", "Petra"); - - // wait up to 10 seconds but it will likely be a lot less - // as the service invocation will wake this up earlier - OneWayServiceImpl.mutex.wait(10000); - } - assertEquals("Petra", OneWayServiceImpl.name); - } - - @Test - public void testObject() throws Exception { - - Set arg = new HashSet(); - arg.add(new Integer(3)); - - synchronized (OneWayObjectServiceImpl.mutex) { - - sendObjectMessage("dynamicQueues/ObjectDest", arg); - - // wait up to 10 seconds but it will likely be a lot less - // as the service invocation will wake this up earlier - OneWayObjectServiceImpl.mutex.wait(10000); - } - assertEquals(arg, OneWayObjectServiceImpl.name); - } - - private static BrokerService broker; - protected static void startBroker() throws Exception { - broker = new BrokerService(); - broker.setPersistent(false); - broker.setUseJmx(false); - broker.addConnector("tcp://localhost:61623"); - broker.start(); - } - - protected static void stopBroker() throws Exception { - if (broker != null) { - broker.stop(); - } - } - - protected static void sendTextMessage(String destName, String payload) throws JMSException, NamingException { - JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623"); - Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = session.createProducer(rf.lookupDestination(destName)); - rf.getConnection().start(); - session.run(); - p.send(session.createTextMessage(payload)); - rf.closeConnection(); - } - - protected static void sendObjectMessage(String destName, Object payload) throws JMSException, NamingException { - JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623"); - Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE); - MessageProducer p = session.createProducer(rf.lookupDestination(destName)); - rf.getConnection().start(); - session.run(); - p.send(session.createObjectMessage((Serializable)payload)); - rf.closeConnection(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/noreplyto/pom.xml b/branches/sca-java-2.0-M4/itest/jms/noreplyto/pom.xml deleted file mode 100644 index f6e0076157..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/noreplyto/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-noreplyto - Apache Tuscany SCA iTest JMS No replyTo - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldService { - String sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - if ("bang".equals(name)) { - throw new RuntimeException("blem wit"); - } - return "jmsHello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 58ceeded7e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/service.composite b/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/service.composite deleted file mode 100644 index 86bb60c147..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/main/resources/service.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java b/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java deleted file mode 100644 index 848e340181..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import java.util.Properties; - -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.Destination; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageProducer; -import javax.jms.ObjectMessage; -import javax.jms.Session; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Uses a non-Tuscany JMS client to send/receive a JMS request to a Tuscany/SCA JMS service - */ -public class NoReplyToTestCase { - - private Node node; - private Session session; - private InitialContext context; - private Connection connection; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - sendJMSRequest(); - String response = receiveJMSResponse(); - assertEquals("jmsHello Petra", response); - } - - private void sendJMSRequest() throws NamingException, JMSException { - context = new InitialContext(new Properties()); - ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory"); - connection = cf.createConnection(); - connection.start(); - - session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - Destination toDest = (Destination)context.lookup("RequestQueue"); - - ObjectMessage m = session.createObjectMessage(); - m.setObject("Petra"); - - MessageProducer producer = session.createProducer(toDest); - producer.send(m); - } - - private String receiveJMSResponse() throws NamingException, JMSException { - Destination replyDest = (Destination)context.lookup("ResponseQueue"); - MessageConsumer consumer = session.createConsumer(replyDest); - Message m = consumer.receive(5000); - if (m == null) { - throw new RuntimeException("No reply message received"); - } - return ((ObjectMessage)m).getObject().toString(); - } - - @After - public void end() throws JMSException { - if (node != null) { - node.stop(); - } - if (connection != null) { - connection.close(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/pom.xml b/branches/sca-java-2.0-M4/itest/jms/nulls/pom.xml deleted file mode 100644 index 98480566e5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-nulls - Apache Tuscany SCA iTest JMS Nulls - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.activemq - activemq-core - 5.2.0 - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index 7fed36fa77..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the OneWay service. - */ -@Service(MyService.class) -public class ClientImpl implements MyService { - - private MyService serviceA; - - @Reference - public void setServiceA(MyService service) { - this.serviceA = service; - } - - public void sayHello() { - serviceA.sayHello(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java b/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java deleted file mode 100644 index 7ab6019fd5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface MyService { - - void sayHello(); - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java deleted file mode 100644 index 89758becff..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - - -public class ServiceImpl implements MyService { - - public void sayHello() { - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index eee9c86565..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/jndi.properties deleted file mode 100644 index bb431a592b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory, ConnectionFactory2 - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic -topic.ServiceTopic = ServiceTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/nulls.composite b/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/nulls.composite deleted file mode 100644 index e190cf92c9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/src/main/resources/nulls.composite +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java deleted file mode 100644 index ac872f46a6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - */ -public class NullsTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testSayHello() throws Exception { - MyService client1 = node.getService(MyService.class, "Client1"); - - client1.sayHello(); - - } - - @Test - public void testSayHelloObjectFormat() throws Exception { - MyService client1 = node.getService(MyService.class, "Client2"); - - client1.sayHello(); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/pom.xml b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/pom.xml deleted file mode 100644 index bf4625fb3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-jms-oneway-nocf - Apache Tuscany SCA iTest JMS for a oneway service - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the OneWay service. - */ -@Service(OneWayService.class) -public class OneWayClientImpl implements OneWayService { - - private OneWayService serviceA; - - @Reference - public void setServiceA(OneWayService service) { - this.serviceA = service; - } - - public void sayHello(String name) { - serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface OneWayService { - - @OneWay - void sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class OneWayServiceImpl implements OneWayService { - - public static Object mutex = new Object(); - public static String name; - - public void sayHello(String name) { - OneWayServiceImpl.name = name; - synchronized (OneWayServiceImpl.mutex) { - OneWayServiceImpl.mutex.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 360b365d1b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/jndi.properties deleted file mode 100644 index 8934614a8a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = SomeConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.SomeQueue = RequestQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite deleted file mode 100644 index 70a106bf06..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite deleted file mode 100644 index 5412a1d6e0..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java b/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java deleted file mode 100644 index 5d1f764382..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class OneWayTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testOneWayInvoked() throws Exception { - OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient"); - oneWayService.sayHello("Petra"); - synchronized (OneWayServiceImpl.mutex) { - // wait up to 10 seconds but it will likely be a lot less - // as the service invocation will wake this up earlier - OneWayServiceImpl.mutex.wait(10000); - } - assertEquals("Petra", OneWayServiceImpl.name); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/pom.xml b/branches/sca-java-2.0-M4/itest/jms/oneway/pom.xml deleted file mode 100644 index edf0c10b39..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-oneway - Apache Tuscany SCA iTest JMS with Oneway - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the OneWay service. - */ -@Service(OneWayService.class) -public class OneWayClientImpl implements OneWayService { - - private OneWayService serviceA; - - @Reference - public void setServiceA(OneWayService service) { - this.serviceA = service; - } - - public void sayHello(String name) { - serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java deleted file mode 100644 index 9083ba1d9c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface OneWayObjectService { - - @OneWay - void sayHello(Object name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java deleted file mode 100644 index 3149f99a25..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class OneWayObjectServiceImpl implements OneWayObjectService { - - public static Object mutex = new Object(); - public static Object name; - - public void sayHello(Object name) { - OneWayObjectServiceImpl.name = name; - synchronized (OneWayObjectServiceImpl.mutex) { - OneWayObjectServiceImpl.mutex.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface OneWayService { - - @OneWay - void sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class OneWayServiceImpl implements OneWayService { - - public static Object mutex = new Object(); - public static String name; - - public void sayHello(String name) { - OneWayServiceImpl.name = name; - synchronized (OneWayServiceImpl.mutex) { - OneWayServiceImpl.mutex.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 360b365d1b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite deleted file mode 100644 index eeeb3b90d0..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite b/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite deleted file mode 100644 index e41e226994..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java b/branches/sca-java-2.0-M4/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java deleted file mode 100644 index 14bbf238e1..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class OneWayTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testOneWayInvoked() throws Exception { - OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient"); - oneWayService.sayHello("Petra"); - synchronized (OneWayServiceImpl.mutex) { - // wait up to 10 seconds but it will likely be a lot less - // as the service invocation will wake this up earlier - OneWayServiceImpl.mutex.wait(10000); - } - assertEquals("Petra", OneWayServiceImpl.name); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/pom.xml b/branches/sca-java-2.0-M4/itest/jms/policy-headers/pom.xml deleted file mode 100644 index eef6c9b359..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-policy-headers - Apache Tuscany SCA iTest JMS with Policy Headers - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java deleted file mode 100644 index d4cd5df431..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - - -/** - * The client interface - */ -public interface JMSClient { - - void aClientMethod(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java deleted file mode 100644 index 464072b42d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - - -/** - * The client interface - */ -public interface MsgClient { - - void aClientMethod(); - void op2(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java deleted file mode 100644 index 4140fa0b89..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(MsgClient.class) -public class MsgClientImpl implements MsgClient { - - @Reference protected MsgClientService myService; - - public void aClientMethod() { - myService.aClientMethod(); - } - - public void op2() { - myService.op2(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java deleted file mode 100644 index 2be4f2ad3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - - -/** - * The client interface - */ -@Remotable -public interface MsgClientService { - - void aClientMethod(); - - void op2(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java deleted file mode 100644 index d5684ca56c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.AllowsPassByReference; -import org.oasisopen.sca.annotation.Remotable; - - -@Remotable -@AllowsPassByReference -public interface MsgService { - - void onMessage(javax.jms.Message msg); - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java deleted file mode 100644 index e18de0456c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import javax.jms.Message; - -import org.oasisopen.sca.annotation.Service; - -@Service(MsgService.class) -public class MsgServiceImpl implements MsgService { - - public static Object lock = new Object(); - public static Message msg; - - public void onMessage(Message msg) { - MsgServiceImpl.msg = msg; - synchronized(lock) { - lock.notifyAll(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a930b9e9a7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/definitions.xml b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/definitions.xml deleted file mode 100644 index 8c608adec9..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/definitions.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite deleted file mode 100644 index f2761f0b78..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - myHeadP1 - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java b/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java deleted file mode 100644 index ebffbc4bc4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import javax.jms.DeliveryMode; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - -/** - */ -public class PolicyHeadersTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testProps1() throws Exception { - JMSClient client = node.getService(JMSClient.class, "ClientComponent"); - - client.aClientMethod(); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized(MsgServiceImpl.lock) { - if (MsgServiceImpl.msg == null) { - MsgServiceImpl.lock.wait(5000); // For debugging set higher. - } - } - assertNotNull(MsgServiceImpl.msg); - - assertEquals("myType", MsgServiceImpl.msg.getJMSType()); - assertEquals(DeliveryMode.PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode()); - assertEquals(7, MsgServiceImpl.msg.getJMSPriority()); - assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1")); - } - - @Test - @Ignore - public void testOp2() throws Exception { - MsgClient client = node.getService(MsgClient.class, "ClientComponent"); - - client.op2(); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized(MsgServiceImpl.lock) { - if (MsgServiceImpl.msg == null) { - MsgServiceImpl.lock.wait(5000); - } - } - assertNotNull(MsgServiceImpl.msg); - - assertEquals("op2Type", MsgServiceImpl.msg.getJMSType()); - assertEquals(DeliveryMode.NON_PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode()); - assertEquals(3, MsgServiceImpl.msg.getJMSPriority()); - assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1")); - assertEquals("foo", MsgServiceImpl.msg.getStringProperty("op2P2")); - assertEquals("nativeOp2", MsgServiceImpl.msg.getStringProperty("scaOperationName")); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/pom.xml b/branches/sca-java-2.0-M4/itest/jms/pom.xml deleted file mode 100644 index 3e7815da0c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - pom - itest-jms - Apache Tuscany SCA iTest JMS - - - args - defaults - DynamicReplyQ - exceptions - exceptions1 - externalBroker - format-jmsbytes - format-jmsbytesxml - format-jmsdefault - format-jmsmessage - format-jmsobject - format-jmstext - format-jmstextxml - format-jmstextxmlinjmsobjectout - non-sca-client - noreplyto - nulls - oneway - oneway-nocf - policy-headers - properties - responsecf - rpc - selectors - topics - ttl - uri-rpc - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/pom.xml b/branches/sca-java-2.0-M4/itest/jms/properties/pom.xml deleted file mode 100644 index 43d8b3c3fe..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-properties - Apache Tuscany SCA iTest JMS with Properties - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java deleted file mode 100644 index d4cd5df431..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - - -/** - * The client interface - */ -public interface JMSClient { - - void aClientMethod(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java deleted file mode 100644 index 464072b42d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - - -/** - * The client interface - */ -public interface MsgClient { - - void aClientMethod(); - void op2(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java deleted file mode 100644 index 4140fa0b89..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(MsgClient.class) -public class MsgClientImpl implements MsgClient { - - @Reference protected MsgClientService myService; - - public void aClientMethod() { - myService.aClientMethod(); - } - - public void op2() { - myService.op2(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java deleted file mode 100644 index 2be4f2ad3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - - -/** - * The client interface - */ -@Remotable -public interface MsgClientService { - - void aClientMethod(); - - void op2(); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java deleted file mode 100644 index d5684ca56c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.AllowsPassByReference; -import org.oasisopen.sca.annotation.Remotable; - - -@Remotable -@AllowsPassByReference -public interface MsgService { - - void onMessage(javax.jms.Message msg); - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java deleted file mode 100644 index e18de0456c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import javax.jms.Message; - -import org.oasisopen.sca.annotation.Service; - -@Service(MsgService.class) -public class MsgServiceImpl implements MsgService { - - public static Object lock = new Object(); - public static Message msg; - - public void onMessage(Message msg) { - MsgServiceImpl.msg = msg; - synchronized(lock) { - lock.notifyAll(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a930b9e9a7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/properties/properties.composite b/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/properties/properties.composite deleted file mode 100644 index 73f2a8eadc..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/main/resources/properties/properties.composite +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - myHeadP1 - - - - foo - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java b/branches/sca-java-2.0-M4/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java deleted file mode 100644 index 29d5a345b2..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import javax.jms.DeliveryMode; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - */ -public class PropertiesTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testProps1() throws Exception { - JMSClient client = node.getService(JMSClient.class, "ClientComponent"); - - client.aClientMethod(); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized(MsgServiceImpl.lock) { - if (MsgServiceImpl.msg == null) { - MsgServiceImpl.lock.wait(5000); - } - } - assertNotNull(MsgServiceImpl.msg); - - assertEquals("myType", MsgServiceImpl.msg.getJMSType()); - assertEquals(DeliveryMode.PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode()); - // assertEquals(3, MsgServiceImpl.msg.getJMSPriority()); // Doesn't seem to work with ActiveMQ - assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1")); - } - - @Test - public void testOp2() throws Exception { - MsgClient client = node.getService(MsgClient.class, "ClientComponent"); - - client.op2(); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized(MsgServiceImpl.lock) { - if (MsgServiceImpl.msg == null) { - MsgServiceImpl.lock.wait(6000); - } - } - assertNotNull(MsgServiceImpl.msg); - - assertEquals("op2Type", MsgServiceImpl.msg.getJMSType()); - // assertEquals(DeliveryMode.NON_PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode()); // Doesn't seem to work with ActiveMQ - // assertEquals(3, MsgServiceImpl.msg.getJMSPriority()); // Doesn't seem to work with ActiveMQ - assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1")); - assertEquals("foo", MsgServiceImpl.msg.getStringProperty("op2P2")); - //operation properties are a service side thing - //assertEquals("nativeOp2", MsgServiceImpl.msg.getStringProperty("scaOperationName")); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/pom.xml b/branches/sca-java-2.0-M4/itest/jms/responsecf/pom.xml deleted file mode 100644 index 1caa55460a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-responsecf - Apache Tuscany SCA iTest JMS Response ConnectionFactory - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldClientImpl implements HelloWorldService { - - private HelloWorldService serviceA; - - @Reference - public void setServiceA(HelloWorldService service) { - this.serviceA = service; - } - - public String sayHello(String name) { - return serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldService { - String sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - if ("bang".equals(name)) { - throw new RuntimeException("blem wit"); - } - return "jmsHello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c062ef9ec0..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/client.composite b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/client.composite deleted file mode 100644 index 3a03f9b675..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/client.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/service.composite b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/service.composite deleted file mode 100644 index d7ba8f2838..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/cf/service.composite +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/jndi.properties deleted file mode 100644 index a41e42950e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory, ResponseCF - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.DestQueueA = RequestQueue -queue.RespQueueA = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java b/branches/sca-java-2.0-M4/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java deleted file mode 100644 index 03b834ce7d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a response ConnectionFactory - */ -public class ResponseCFTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient"); - assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra")); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/pom.xml b/branches/sca-java-2.0-M4/itest/jms/rpc/pom.xml deleted file mode 100644 index 3c38e20e6f..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-rpc - Apache Tuscany SCA iTest JMS with RPC - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldClientImpl implements HelloWorldService { - - private HelloWorldService serviceA; - - @Reference - public void setServiceA(HelloWorldService service) { - this.serviceA = service; - } - - public String sayHello(String name) { - return serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldService { - String sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - if ("bang".equals(name)) { - throw new RuntimeException("blem wit"); - } - return "jmsHello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c062ef9ec0..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/client.composite b/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/client.composite deleted file mode 100644 index bed860e2cd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/client.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/service.composite b/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/service.composite deleted file mode 100644 index 01553a968c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/main/resources/simple/service.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java b/branches/sca-java-2.0-M4/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java deleted file mode 100644 index 3c0eb0791b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class RPCTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient"); - assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra")); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/pom.xml b/branches/sca-java-2.0-M4/itest/jms/selectors/pom.xml deleted file mode 100644 index 0cf3c4d2cb..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-selectors - Apache Tuscany SCA iTest JMS Tests For Selectors - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index b589d5e8bc..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the OneWay service. - */ -@Service(SelectorService.class) -public class ClientImpl implements SelectorService { - - private SelectorService serviceA; - - @Reference - public void setServiceA(SelectorService service) { - this.serviceA = service; - } - - public void sayHello(String name) { - serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java deleted file mode 100644 index 1aff0d454e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface SelectorService { - - @OneWay - void sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java deleted file mode 100644 index fb53c877e6..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import java.util.ArrayList; -import java.util.List; - -public class SelectorServiceImpl1 implements SelectorService { - - public static Object lock = new Object(); - public static List names = new ArrayList(); - - public void sayHello(String name) { - System.out.println("SelectorServiceImpl1 " + name); - SelectorServiceImpl1.names.add(name); - if (names.size() == 2) { - synchronized (SelectorServiceImpl1.lock) { - SelectorServiceImpl1.lock.notify(); - } - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java deleted file mode 100644 index 1bbaf5d6f4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class SelectorServiceImpl2 implements SelectorService { - - public static Object lock = new Object(); - public static String name; - - public void sayHello(String name) { - if (SelectorServiceImpl2.name != null) { - throw new IllegalStateException("name already set"); - } - System.out.println("SelectorServiceImpl2 " + name); - SelectorServiceImpl2.name = name; - synchronized (SelectorServiceImpl2.lock) { - SelectorServiceImpl2.lock.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java deleted file mode 100644 index 4bdc4edcb5..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class SelectorServiceImpl3 implements SelectorService { - - public static Object lock = new Object(); - public static String name; - - public void sayHello(String name) { - if (SelectorServiceImpl3.name != null) { - throw new IllegalStateException("name already set"); - } - System.out.println("SelectorServiceImpl3 " + name); - SelectorServiceImpl3.name = name; - synchronized (SelectorServiceImpl3.lock) { - SelectorServiceImpl3.lock.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java deleted file mode 100644 index 0592194b21..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java deleted file mode 100644 index 2d4ff0192b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - @Reference - protected HelloWorldService helloWorldService2; - - public String getGreetings(String name){ - return helloWorldService1.getGreetingsOne(name) + " " + - helloWorldService1.getGreetingsTwo(name) + " " + - helloWorldService2.getGreetingsOne(name) + " " + - helloWorldService1.getGreetingsThree(name); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java deleted file mode 100644 index b632b3f60f..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetingsOne(String name); - - public String getGreetingsTwo(String name); - - public String getGreetingsThree(String name); - - public String getGreetingsFour(String name); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java deleted file mode 100644 index b2df9137c8..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getGreetingsOne(String name){ - String response = "Hello One " + name; - System.out.println("getGreetingsOne: " + response); - return response; - } - - public String getGreetingsTwo(String name){ - String response = "Hello Two " + name; - System.out.println("getGreetingsTwo: " + response); - return response; - } - - public String getGreetingsThree(String name){ - String response = "Hello Three " + name; - System.out.println("getGreetingsThree: " + response); - return response; - } - - public String getGreetingsFour(String name){ - String response = "Hello Four " + name; - System.out.println("getGreetingsFour: " + response); - return response; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java deleted file mode 100644 index 0b24678543..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldReference { - - public String getGreetings(String name); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java deleted file mode 100644 index 0ce66005fc..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -import org.oasisopen.sca.annotation.Reference; - - -public class HelloWorldReferenceImpl implements HelloWorldReference { - - @Reference - protected HelloWorldService helloWorldService1; - - - public String getGreetings(String name){ - return helloWorldService1.getGreetingsOne(name) + " " + - helloWorldService1.getGreetingsTwo(name) + " " + - helloWorldService1.getGreetingsThree(name); - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java deleted file mode 100644 index 7e42113da4..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the business interface of the HelloWorld greetings service. - */ -@Remotable -public interface HelloWorldService { - - public String getGreetingsOne(String name); - - public String getGreetingsTwo(String name); - - public String getGreetingsThree(String name); - - public String getGreetingsFour(String name); - -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java deleted file mode 100644 index 724de6ff7c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String getGreetingsOne(String name){ - String response = "Hello One " + name; - System.out.println("getGreetingsOne: " + response); - return response; - } - - public String getGreetingsTwo(String name){ - String response = "Hello Two " + name; - System.out.println("getGreetingsTwo: " + response); - return response; - } - - public String getGreetingsThree(String name){ - String response = "Hello Three " + name; - System.out.println("getGreetingsThree: " + response); - return response; - } - - public String getGreetingsFour(String name){ - String response = "Hello Four " + name; - System.out.println("getGreetingsFour: " + response); - return response; - } -} - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 59cf4aee9d..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite deleted file mode 100644 index ab8e29ccdd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - getGreetingsThree - - - - - - - - - - - - - - getGreetingsThree - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite deleted file mode 100644 index af36b8af9b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - getGreetingsOne - - - - - getGreetingsThree - - - - - getGreetingsTwo - - - - - - - - - - - - - - getGreetingsThree - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jndi.properties deleted file mode 100644 index bb431a592b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory, ConnectionFactory2 - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic -topic.ServiceTopic = ServiceTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/selectors/selectors.composite b/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/selectors/selectors.composite deleted file mode 100644 index bf10f20d38..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/main/resources/selectors/selectors.composite +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java deleted file mode 100644 index bee0c549bd..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class OperationselectorJMSDefaultTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldReference = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent"); - - assertEquals("Hello One Fred Bloggs Hello Two Fred Bloggs Hello Three Fred Bloggs Hello Four Fred Bloggs", helloWorldReference.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java deleted file mode 100644 index 33e047ae18..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReference; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class OperationselectorJMSUserPropTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldReference helloWorldReference = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent1"); - - assertEquals("Hello One Fred Bloggs Hello Four Fred Bloggs Hello Two Fred Bloggs", helloWorldReference.getGreetings("Fred Bloggs")); - - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java deleted file mode 100644 index e7254005be..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - */ -public class SelectorsTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testSayHello() throws Exception { - SelectorService client1 = node.getService(SelectorService.class, "Client1"); - SelectorService client2 = node.getService(SelectorService.class, "Client2"); - - client1.sayHello("petra"); - client2.sayHello("beate"); - - // wait for up to 5 seconds but should wake up as soon as done - synchronized(SelectorServiceImpl2.lock) { - if (SelectorServiceImpl2.name == null) { - SelectorServiceImpl2.lock.wait(5000); - } - } - synchronized(SelectorServiceImpl3.lock) { - if (SelectorServiceImpl3.name == null) { - SelectorServiceImpl3.lock.wait(5000); - } - } - synchronized(SelectorServiceImpl1.lock) { - if (SelectorServiceImpl1.names.size() != 2) { - SelectorServiceImpl1.lock.wait(5000); - } - } - - assertEquals("petra", SelectorServiceImpl2.name); - assertEquals("beate", SelectorServiceImpl3.name); - assertEquals(2, SelectorServiceImpl1.names.size()); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/pom.xml b/branches/sca-java-2.0-M4/itest/jms/topics/pom.xml deleted file mode 100644 index 47ec58acdf..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-topics - Apache Tuscany SCA JMS Tests for topics - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - test - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java deleted file mode 100644 index b572b1012a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the OneWay service. - */ -@Service(OneWayService.class) -public class OneWayClientImpl implements OneWayService { - - private OneWayService serviceA; - - @Reference - public void setServiceA(OneWayService service) { - this.serviceA = service; - } - - public void sayHello(String name) { - serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java deleted file mode 100644 index 9cec2d9b3e..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface OneWayService { - - @OneWay - void sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java deleted file mode 100644 index 0036391696..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -public class OneWayServiceImpl implements OneWayService { - - public static Object mutex = new Object(); - public static String name; - - public void sayHello(String name) { - OneWayServiceImpl.name = name; - synchronized (OneWayServiceImpl.mutex) { - OneWayServiceImpl.mutex.notify(); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2690297524..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/jndi.properties deleted file mode 100644 index 9888d5843b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic -topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsClient.composite b/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsClient.composite deleted file mode 100644 index b951484044..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsClient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsService.composite b/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsService.composite deleted file mode 100644 index 80c653cc29..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/main/resources/topics/TopicsService.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java b/branches/sca-java-2.0-M4/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java deleted file mode 100644 index 35fe96b81a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class TopicsTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testOneWayInvoked() throws Exception { - OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient"); - oneWayService.sayHello("Petra"); - synchronized (OneWayServiceImpl.mutex) { - // wait up to 10 seconds but it will likely be a lot less - // as the service invocation will wake this up earlier - OneWayServiceImpl.mutex.wait(10000); - } - assertEquals("Petra", OneWayServiceImpl.name); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/pom.xml b/branches/sca-java-2.0-M4/itest/jms/ttl/pom.xml deleted file mode 100644 index ac8e5c5291..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-ttl - Apache Tuscany SCA iTest JMS Time To Live - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.activemq - activemq-core - 5.2.0 - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java b/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java deleted file mode 100644 index 336fecf67b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java +++ /dev/null @@ -1,904 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.Serializable; -import java.util.Enumeration; -import java.util.Hashtable; - -import javax.jms.BytesMessage; -import javax.jms.Connection; -import javax.jms.ConnectionConsumer; -import javax.jms.ConnectionFactory; -import javax.jms.ConnectionMetaData; -import javax.jms.Destination; -import javax.jms.ExceptionListener; -import javax.jms.JMSException; -import javax.jms.MapMessage; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageListener; -import javax.jms.MessageProducer; -import javax.jms.ObjectMessage; -import javax.jms.Queue; -import javax.jms.QueueBrowser; -import javax.jms.ServerSessionPool; -import javax.jms.Session; -import javax.jms.StreamMessage; -import javax.jms.TemporaryQueue; -import javax.jms.TemporaryTopic; -import javax.jms.TextMessage; -import javax.jms.Topic; -import javax.jms.TopicSubscriber; -import javax.naming.Binding; -import javax.naming.Context; -import javax.naming.Name; -import javax.naming.NameClassPair; -import javax.naming.NameParser; -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; - -/** - * Some classes that mock up various JMS interfaces with the end result - * of having the Time-To-Live value set on the static timeToLive - * - * This class is referenced from the AMQ jndi.properties file - */ -public class MockInitialContextFactory extends org.apache.activemq.jndi.ActiveMQInitialContextFactory{ - - public static Object lock = new Object(); - public static Long timeToLive; - - public Context getInitialContext(Hashtable environment) throws NamingException { - return new Context() { - - public Object addToEnvironment(String propName, Object propVal) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void bind(Name name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public void bind(String name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public void close() throws NamingException { - // TODO Auto-generated method stub - - } - - public Name composeName(Name name, Name prefix) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public String composeName(String name, String prefix) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Context createSubcontext(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Context createSubcontext(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void destroySubcontext(Name name) throws NamingException { - // TODO Auto-generated method stub - - } - - public void destroySubcontext(String name) throws NamingException { - // TODO Auto-generated method stub - - } - - public Hashtable getEnvironment() throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public String getNameInNamespace() throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NameParser getNameParser(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NameParser getNameParser(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration list(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration list(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration listBindings(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration listBindings(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Object lookup(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Object lookup(String name) throws NamingException { - if (name.endsWith("ConnectionFactory")) { - return new ConnectionFactory() { - public Connection createConnection() throws JMSException { - return new Connection(){ - - public void close() throws JMSException { - // TODO Auto-generated method stub - - } - - public ConnectionConsumer createConnectionConsumer(Destination arg0, - String arg1, - ServerSessionPool arg2, - int arg3) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public ConnectionConsumer createDurableConnectionConsumer(Topic arg0, - String arg1, - String arg2, - ServerSessionPool arg3, - int arg4) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public Session createSession(boolean arg0, int arg1) throws JMSException { - // TODO Auto-generated method stub - return new Session() { - - public void close() throws JMSException { - // TODO Auto-generated method stub - - } - - public void commit() throws JMSException { - // TODO Auto-generated method stub - - } - - public QueueBrowser createBrowser(Queue arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public QueueBrowser createBrowser(Queue arg0, String arg1) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public BytesMessage createBytesMessage() throws JMSException { - // TODO Auto-generated method stub - return new BytesMessage() { - - public long getBodyLength() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public boolean readBoolean() throws JMSException { - // TODO Auto-generated method stub - return false; - } - - public byte readByte() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public int readBytes(byte[] arg0) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public int readBytes(byte[] arg0, int arg1) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public char readChar() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public double readDouble() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public float readFloat() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public int readInt() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public long readLong() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public short readShort() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public String readUTF() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public int readUnsignedByte() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public int readUnsignedShort() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public void reset() throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeBoolean(boolean arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeByte(byte arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeBytes(byte[] arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeBytes(byte[] arg0, int arg1, int arg2) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeChar(char arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeDouble(double arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeFloat(float arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeInt(int arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeLong(long arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeObject(Object arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeShort(short arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void writeUTF(String arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void acknowledge() throws JMSException { - // TODO Auto-generated method stub - - } - - public void clearBody() throws JMSException { - // TODO Auto-generated method stub - - } - - public void clearProperties() throws JMSException { - // TODO Auto-generated method stub - - } - - public boolean getBooleanProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return false; - } - - public byte getByteProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public double getDoubleProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public float getFloatProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public int getIntProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public String getJMSCorrelationID() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public byte[] getJMSCorrelationIDAsBytes() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public int getJMSDeliveryMode() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public Destination getJMSDestination() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public long getJMSExpiration() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public String getJMSMessageID() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public int getJMSPriority() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public boolean getJMSRedelivered() throws JMSException { - // TODO Auto-generated method stub - return false; - } - - public Destination getJMSReplyTo() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public long getJMSTimestamp() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public String getJMSType() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public long getLongProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public Object getObjectProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public Enumeration getPropertyNames() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public short getShortProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public String getStringProperty(String arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public boolean propertyExists(String arg0) throws JMSException { - // TODO Auto-generated method stub - return false; - } - - public void setBooleanProperty(String arg0, boolean arg1) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void setByteProperty(String arg0, byte arg1) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setDoubleProperty(String arg0, double arg1) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void setFloatProperty(String arg0, float arg1) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void setIntProperty(String arg0, int arg1) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSCorrelationID(String arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSCorrelationIDAsBytes(byte[] arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSDeliveryMode(int arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSDestination(Destination arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSExpiration(long arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSMessageID(String arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSPriority(int arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSRedelivered(boolean arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSReplyTo(Destination arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSTimestamp(long arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setJMSType(String arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setLongProperty(String arg0, long arg1) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setObjectProperty(String arg0, Object arg1) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void setShortProperty(String arg0, short arg1) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void setStringProperty(String arg0, String arg1) - throws JMSException { - // TODO Auto-generated method stub - - }}; - } - - public MessageConsumer createConsumer(Destination arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public MessageConsumer createConsumer(Destination arg0, String arg1) - throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public MessageConsumer createConsumer(Destination arg0, - String arg1, - boolean arg2) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public TopicSubscriber createDurableSubscriber(Topic arg0, String arg1) - throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public TopicSubscriber createDurableSubscriber(Topic arg0, - String arg1, - String arg2, - boolean arg3) - throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public MapMessage createMapMessage() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public Message createMessage() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public ObjectMessage createObjectMessage() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public ObjectMessage createObjectMessage(Serializable arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public MessageProducer createProducer(Destination arg0) throws JMSException { - return new MessageProducer() { - - public void close() throws JMSException { - // TODO Auto-generated method stub - - } - - public int getDeliveryMode() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public Destination getDestination() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public boolean getDisableMessageID() throws JMSException { - // TODO Auto-generated method stub - return false; - } - - public boolean getDisableMessageTimestamp() throws JMSException { - // TODO Auto-generated method stub - return false; - } - - public int getPriority() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public long getTimeToLive() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public void send(Message arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void send(Destination arg0, Message arg1) throws JMSException { - // TODO Auto-generated method stub - - } - - public void send(Message arg0, int arg1, int arg2, long arg3) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void send(Destination arg0, - Message arg1, - int arg2, - int arg3, - long arg4) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setDeliveryMode(int arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setDisableMessageID(boolean arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setDisableMessageTimestamp(boolean arg0) - throws JMSException { - // TODO Auto-generated method stub - - } - - public void setPriority(int arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setTimeToLive(long arg0) throws JMSException { - MockInitialContextFactory.timeToLive = Long.valueOf(arg0); - synchronized(MockInitialContextFactory.lock) { - MockInitialContextFactory.lock.notifyAll(); - } - }}; - } - - public Queue createQueue(String arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public StreamMessage createStreamMessage() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public TemporaryQueue createTemporaryQueue() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public TemporaryTopic createTemporaryTopic() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public TextMessage createTextMessage() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public TextMessage createTextMessage(String arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public Topic createTopic(String arg0) throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public int getAcknowledgeMode() throws JMSException { - // TODO Auto-generated method stub - return 0; - } - - public MessageListener getMessageListener() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public boolean getTransacted() throws JMSException { - // TODO Auto-generated method stub - return false; - } - - public void recover() throws JMSException { - // TODO Auto-generated method stub - - } - - public void rollback() throws JMSException { - // TODO Auto-generated method stub - - } - - public void run() { - // TODO Auto-generated method stub - - } - - public void setMessageListener(MessageListener arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void unsubscribe(String arg0) throws JMSException { - // TODO Auto-generated method stub - - }}; - } - - public String getClientID() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public ExceptionListener getExceptionListener() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public ConnectionMetaData getMetaData() throws JMSException { - // TODO Auto-generated method stub - return null; - } - - public void setClientID(String arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void setExceptionListener(ExceptionListener arg0) throws JMSException { - // TODO Auto-generated method stub - - } - - public void start() throws JMSException { - // TODO Auto-generated method stub - - } - - public void stop() throws JMSException { - // TODO Auto-generated method stub - - }}; - } - public Connection createConnection(String arg0, String arg1) throws JMSException { - return null; - }}; - } else { - return new Queue(){ - public String getQueueName() throws JMSException { - return null; - }}; - } - } - - public Object lookupLink(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Object lookupLink(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void rebind(Name name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public void rebind(String name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public Object removeFromEnvironment(String propName) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void rename(Name oldName, Name newName) throws NamingException { - // TODO Auto-generated method stub - - } - - public void rename(String oldName, String newName) throws NamingException { - // TODO Auto-generated method stub - - } - - public void unbind(Name name) throws NamingException { - // TODO Auto-generated method stub - - } - - public void unbind(String name) throws NamingException { - // TODO Auto-generated method stub - - }}; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java b/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java deleted file mode 100644 index dc6577b7e1..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface ClientIface { - - @OneWay - void sayHello(String s); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java deleted file mode 100644 index 4f9908f062..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; - -/** - * This class implements the OneWay service. - */ -public class ClientImpl implements ClientIface { - - private ClientIface serviceA; - - @Reference - public void setServiceA(ClientIface service) { - this.serviceA = service; - } - - public void sayHello(String name) { - serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index eeae8fcc59..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/jndi.properties deleted file mode 100644 index 040ec282d7..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/jndi.properties +++ /dev/null @@ -1,38 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = itest.MockInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory, ConnectionFactory2 - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic -topic.ServiceTopic = ServiceTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/ttl.composite b/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/ttl.composite deleted file mode 100644 index 91b64cf8dc..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/src/main/resources/ttl.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java b/branches/sca-java-2.0-M4/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java deleted file mode 100644 index b5839f4c4f..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import itest.MockInitialContextFactory; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - */ -public class TTLTestCase { - - private Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @Test - public void testSayHello() throws Exception { - ClientIface client1 = node.getService(ClientIface.class, "Client1"); - - client1.sayHello("petra"); - - synchronized(MockInitialContextFactory.lock) { - if (MockInitialContextFactory.timeToLive == null) { - MockInitialContextFactory.lock.wait(10000); - } - } - - assertNotNull(MockInitialContextFactory.timeToLive); - assertEquals(123, MockInitialContextFactory.timeToLive.longValue()); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/pom.xml b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/pom.xml deleted file mode 100644 index 6edb521611..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-jms-uri-rpc - Apache Tuscany SCA iTest JMS with URI RPC - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-M4-SNAPSHOT - - - - org.apache.activemq - activemq-core - 5.2.0 - runtime - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - - - - - - - - ${artifactId} - - diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java deleted file mode 100644 index 9aef6ba1a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class implements the HelloWorld service. - */ -@Service(HelloWorldService.class) -public class HelloWorldClientImpl implements HelloWorldService { - - private HelloWorldService serviceA; - - @Reference - public void setServiceA(HelloWorldService service) { - this.serviceA = service; - } - - public String sayHello(String name) { - return serviceA.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java deleted file mode 100644 index 430c71aaef..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface HelloWorldService { - String sayHello(String name); -} diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java deleted file mode 100644 index 2c6d9d0d17..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -public class HelloWorldServiceImpl implements HelloWorldService { - - public String sayHello(String name) { - if ("bang".equals(name)) { - throw new RuntimeException("blem wit"); - } - return "jmsHello " + name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 3349754e4a..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/jndi.properties b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/jndi.properties deleted file mode 100644 index 4d6acc037b..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/jndi.properties +++ /dev/null @@ -1,39 +0,0 @@ -## --------------------------------------------------------------------------- -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## --------------------------------------------------------------------------- - -# START SNIPPET: jndi - -java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory - -# use the following property to configure the default connector -java.naming.provider.url = vm://localhost?broker.persistent=false - -# use the following property to specify the JNDI name the connection factory -# should appear as. -#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry -connectionFactoryNames = ConnectionFactory - -# register some queues in JNDI using the form -# queue.[jndiName] = [physicalName] -queue.RequestQueue = RequestQueue -queue.ResponseQueue = ResponseQueue - -# register some topics in JNDI using the form -# topic.[jndiName] = [physicalName] -#topic.MyTopic = example.MyTopic - -# END SNIPPET: jndi diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/service.composite b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/service.composite deleted file mode 100644 index 01553a968c..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/service.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite deleted file mode 100644 index 9e7b119fad..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java b/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java deleted file mode 100644 index 60b0f0a1a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.binding.jms; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * This shows how to test the JMS binding using a simple HelloWorld application. - */ -public class URIRPCTestCase { - - private static Node node; - - @Before - public void init() { - node = NodeFactory.newInstance().createNode().start(); - } - - @After - public void end() { - if (node != null) { - node.stop(); - } - } - - @Test - public void testHelloWorldCreate() throws Exception { - HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient"); - assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra")); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/pom.xml b/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/pom.xml deleted file mode 100644 index 13b0dd0ab2..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-nodes-helloworld-client - Apache Tuscany SCA iTest Nodes Helloworld Client - - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - provided - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java b/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java deleted file mode 100644 index bf8a588928..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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(){ - System.out.println(">>>>>> " + sayHello("init")); - } - - public String sayHello(String name) { - return "Hi " + service.sayHello(name); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b4ba94220c..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite b/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite deleted file mode 100644 index 9d5e9ae59a..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/pom.xml b/branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/pom.xml deleted file mode 100644 index b8c8205eb2..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-nodes-helloworld-iface - Apache Tuscany SCA iTest Nodes Helloworld IFaces - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - provided - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java b/branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java deleted file mode 100644 index 76f8d4400d..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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); - -} diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/pom.xml b/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/pom.xml deleted file mode 100644 index a8fe3ff7b3..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-nodes-helloworld-service - Apache Tuscany SCA iTest Nodes Helloworld Service - - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - provided - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M4-SNAPSHOT - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java b/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java deleted file mode 100644 index 81f7e1747d..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index c65718909d..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite b/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite deleted file mode 100644 index 6b2d15b7a6..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/one-node-test/pom.xml b/branches/sca-java-2.0-M4/itest/nodes/one-node-test/pom.xml deleted file mode 100644 index 0eb49a19fe..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/one-node-test/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-nodes-one-node-test - Apache Tuscany SCA iTest Nodes One Node Test - - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java b/branches/sca-java-2.0-M4/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java deleted file mode 100644 index 6d49b718ef..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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("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/branches/sca-java-2.0-M4/itest/nodes/pom.xml b/branches/sca-java-2.0-M4/itest/nodes/pom.xml deleted file mode 100644 index 0ef109c44e..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - pom - itest-nodes - Apache Tuscany SCA iTest Nodes - - - install - - - - helloworld-iface - helloworld-service - helloworld-client - one-node-test - two-nodes-test - two-nodes-two-vms-test - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/pom.xml b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/pom.xml deleted file mode 100644 index f5c6d11cda..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-nodes-two-nodes-test - Apache Tuscany SCA iTest Nodes Two Nodes Test - - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-sca-client-impl - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java deleted file mode 100644 index 5f9453a5d6..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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.SCAClient; - -/** - * 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/200903"; - 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 = SCAClient.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = SCAClient.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/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java deleted file mode 100644 index b413825106..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/200903"; - 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/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java deleted file mode 100644 index 4a41ae8133..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java deleted file mode 100644 index 7dfa6e66cc..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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() { - 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() { - 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() { - 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() { - 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() { - 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() { - 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() { - 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() { - public Object run() { - Thread.currentThread().setContextClassLoader(finaltccl); - return null; - } - }); - } - } - -} - diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java deleted file mode 100644 index 769aad1940..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 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.SCAClient; - -/** - * 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.newInstance(); - 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 = SCAClient.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = SCAClient.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/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/build.xml b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/build.xml deleted file mode 100644 index 933aec2636..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client-config.xml b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client-config.xml deleted file mode 100644 index 1bda0ee4b7..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client-config.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client.xml b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client.xml deleted file mode 100644 index bb65805144..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/client.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/pom.xml b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/pom.xml deleted file mode 100644 index 34eadae505..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/pom.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-nodes-two-nodes-two-vms-test - Apache Tuscany SCA iTest Nodes Two Nodes Two VMs Test - - - - org.apache.tuscany.sca - tuscany-endpoint-tribes - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-launcher - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-sca-client-impl - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-sca-axis2-runtime - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-M4-SNAPSHOT - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - - ant - ant-trax - 1.6.5 - - - - sun.jdk - tools - 1.6 - system - ${java.home}/../lib/tools.jar - - - - - - run-samples - verify - - run - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server-config.xml b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server-config.xml deleted file mode 100644 index 14a48f507a..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server-config.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server.xml b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server.xml deleted file mode 100644 index 7b6d206b7f..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/server.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java b/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java deleted file mode 100644 index b27d16a562..0000000000 --- a/branches/sca-java-2.0-M4/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/TwoNodesTestCase.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * This shows how to test the Calculator service component. - */ -public class TwoNodesTestCase { - - private static Node serviceNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - NodeFactory factory = NodeFactory.newInstance(); - - serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL()); - serviceNode.start(); - - } - - @Test - public void testNothing() throws Exception { - - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (serviceNode != null) { - serviceNode.stop(); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/operation-overloading/pom.xml b/branches/sca-java-2.0-M4/itest/operation-overloading/pom.xml deleted file mode 100644 index cd646e490d..0000000000 --- a/branches/sca-java-2.0-M4/itest/operation-overloading/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-operation-overloading - Apache Tuscany SCA iTest Operation Overloading - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java b/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java deleted file mode 100644 index 1f589b44f4..0000000000 --- a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.opoverload; - -/** - * This is an Interface which has methods declared but not implemented, These methods will be implemented in - * OverloadATarget Class and OverloadASource This class has methods with overloaded parameters. - */ - -//@AllowsPassByReference -public interface OverloadASourceTarget { - String opName = "operationA:"; - - /** - * Method with no parameters - */ - String operationA(); - - /** - * Method with one integer parameter - */ - String operationA(int parm1); - - /** - * Method with one integer parameter and one string parameter - */ - String operationA(int parm1, String parm2); - - /** - * Method with one one string parameter and one integer parameter - */ - String operationA(String parm1, int parm2); - - /** - * Method with one string parameter - */ - String operationA(String string); - - /** - * Method which throws an illegal argument exception in case of any exceptions. - */ - String[] operationAall(); - -} diff --git a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java b/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java deleted file mode 100644 index a30d3611fb..0000000000 --- a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.opoverload.impl; - -import java.util.ArrayList; - -import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface OverloadASourceTarget, and gives implementation for all methods which are - * declared in the OverloadASourceTarget interface. - */ -@Service(OverloadASourceTarget.class) -public class OverloadASource implements OverloadASourceTarget { - public OverloadASourceTarget overloadASourceTarget; - - /** - * This is a default constructor - */ - public OverloadASource() { - - } - - /** - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() - */ - public String[] operationAall() { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - ArrayList ret = new ArrayList(); - ret.add(overloadASourceTarget.operationA()); - ret.add(overloadASourceTarget.operationA(11)); - ret.add(overloadASourceTarget.operationA("eleven")); - ret.add(overloadASourceTarget.operationA(3, "three")); - ret.add(overloadASourceTarget.operationA("four", 4)); - return (String[])ret.toArray(new String[ret.size()]); - } - - /** - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() - */ - public String operationA() { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(); - } - - /** - * @param parm1 - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int) - */ - public String operationA(int parm1) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(parm1); - } - - /** - * @param parm1 - * @param parm2 - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, java.lang.String) - */ - public String operationA(int parm1, String parm2) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(parm1, parm2); - } - - public String operationA(String string) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(string); - } - - /** - * @param parm1 - * @param parm2 - * @return - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(java.lang.String, int) - */ - public String operationA(String parm1, int parm2) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; - return overloadASourceTarget.operationA(parm1, parm2); - } - - /** - * This method which is used by all the overloaded functions to set the source target - */ - @Reference - public void setOverloadASourceTarget(OverloadASourceTarget overloadASourceTarget) { - assert overloadASourceTarget != null : "reference overloadASourceTarget is set tonull"; - this.overloadASourceTarget = overloadASourceTarget; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java b/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java deleted file mode 100644 index 9ec60eb78f..0000000000 --- a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.opoverload.impl; - -import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface OverloadASourceTarget, and gives implementation for all methods which are - * declared in the OverloadASourceTarget interface. - */ -@Service(OverloadASourceTarget.class) -public class OverloadATarget implements OverloadASourceTarget { - - /** - * This is a default Constructor - */ - public OverloadATarget() { - - } - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int) - */ - public String operationA(int parm1) { - final String ret = opName + parm1; - out(ret); - return ret; - - } - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, java.lang.String) - */ - public String operationA(int parm1, String parm2) { - final String ret = opName + parm1 + parm2; - out(ret); - return ret; - - } - - /* - * (non-Javadoc) - * - * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() - */ - public String operationA() { - out(opName); - return opName; - - } - - public String operationA(String parm1, int parm2) { - final String ret = opName + parm1 + parm2; - out(ret); - return ret; - } - - public String operationA(String parm1) { - final String ret = opName + parm1; - out(ret); - return ret; - } - - /** - * This method is used to print the message returned by all the overloaded functions - */ - private void out(String msg) { - - java.lang.System.out.println(msg); - } - - public String[] operationAall() { - throw new IllegalArgumentException("not supported"); - - } - -} diff --git a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/resources/OperationOverload.composite b/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/resources/OperationOverload.composite deleted file mode 100644 index cbf5aa2078..0000000000 --- a/branches/sca-java-2.0-M4/itest/operation-overloading/src/main/resources/OperationOverload.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java b/branches/sca-java-2.0-M4/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java deleted file mode 100644 index 62e5c14ce2..0000000000 --- a/branches/sca-java-2.0-M4/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test.opoverload.impl; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -public class OverloadATestCase { - - private static Node node; - private static OverloadASourceTarget overloadA; - - /** - * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This - * test verifies the values compared are same as the values retrieved from the SCA runtime. - */ - @Test - public void testOperationAall() { - String[] result = overloadA.operationAall(); - assertEquals(5, result.length); - assertEquals(OverloadASourceTarget.opName, result[0]); - assertEquals(OverloadASourceTarget.opName + 11, result[1]); - assertEquals(OverloadASourceTarget.opName + "eleven", result[2]); - assertEquals(OverloadASourceTarget.opName + 3 + "three", result[3]); - assertEquals(OverloadASourceTarget.opName + "four" + 4, result[4]); - } - - @Test - public void testOperationAInt() { - String result = overloadA.operationA(29); - assertEquals(OverloadASourceTarget.opName + 29, result); - } - - @Test - public void testOperationAString() { - String result = overloadA.operationA("rick:-)"); - assertEquals(OverloadASourceTarget.opName + "rick:-)", result); - } - - @Test - public void testOperationAIntString() { - String result = overloadA.operationA(123, "Tuscany"); - assertEquals(OverloadASourceTarget.opName + 123 + "Tuscany", result); - } - - @Test - public void testOperationStringInt() { - String result = overloadA.operationA("StringInt", 77); - assertEquals(OverloadASourceTarget.opName + "StringInt" + 77, result); - } - - /** - * setUp() is a method in JUnit Frame Work which is executed before all others methods in the class extending - * unit.framework.TestCase. So this method is used to create a test Embedded SCA node, to start the SCA node and - * to get a reference to the contribution service - */ - - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("OperationOverload.composite"); - node = NodeFactory.newInstance().createNode("OperationOverload.composite", new Contribution("c1", location)); - node.start(); - overloadA = node.getService(OverloadASourceTarget.class, "OverloadASourceComponent"); - } - - /** - * tearDown() is a method in JUnit Frame Work which is executed after all other methods in the class extending - * unit.framework.TestCase. So this method is used to close the SCA node. - */ - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/policies/pom.xml b/branches/sca-java-2.0-M4/itest/policies/pom.xml deleted file mode 100644 index af385501ab..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-policies - Apache Tuscany SCA iTest Policies - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-policy-logging - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java deleted file mode 100644 index fd33be01d6..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies; - -import java.io.Serializable; - -/** - * Credit Card - */ -public class CreditCard implements Serializable { - private static final long serialVersionUID = -6107293191546007197L; - private String type; - private String number; - private String owner; - private int expMonth; - private int expYear; - - public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - public String getNumber() { - return number; - } - public void setNumber(String number) { - this.number = number; - } - public String getOwner() { - return owner; - } - public void setOwner(String owner) { - this.owner = owner; - } - public int getExpMonth() { - return expMonth; - } - public void setExpMonth(int expMonth) { - this.expMonth = expMonth; - } - public int getExpYear() { - return expYear; - } - public void setExpYear(int expYear) { - this.expYear = expYear; - } -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java deleted file mode 100644 index 368179dc29..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies; - -import org.oasisopen.sca.annotation.Authentication; -import org.oasisopen.sca.annotation.Confidentiality; -import org.oasisopen.sca.annotation.Remotable; - -/** - * - */ -@Remotable -@Authentication -public interface CreditCardPayment { - String COMPLETED = "Completed"; - String REJECTED = "Rejected"; - - @Confidentiality - String authorize(CreditCard creditCard, float amount); -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java deleted file mode 100644 index 05ea341466..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies; - -import java.io.Serializable; - -/** - * Customer - */ -public class Customer implements Serializable { - private static final long serialVersionUID = 680227659536711695L; - private String id; - private String name; - private CreditCard creditCard; - - 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; - } - public CreditCard getCreditCard() { - return creditCard; - } - public void setCreditCard(CreditCard creditCard) { - this.creditCard = creditCard; - } -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java deleted file mode 100644 index c9f50d08ee..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies; - -/** - * - */ -public interface CustomerRegistry { - Customer find(String id); -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java deleted file mode 100644 index cc7c555aff..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * - */ -@Remotable -public interface Payment { - String charge(String customerID, float amount); -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java deleted file mode 100644 index 01cc8ac636..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies.impl; - -import org.apache.tuscany.sca.itest.policies.CreditCard; -import org.apache.tuscany.sca.itest.policies.CreditCardPayment; - -/** - * - */ -public class CreditCardPaymentImpl implements CreditCardPayment { - - public String authorize(CreditCard creditCard, float amount) { - System.out.println(creditCard.getType() + " " + creditCard.getNumber()); - System.out.println(amount); - if (amount < 200f) { - return COMPLETED; - } else { - return REJECTED; - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java deleted file mode 100644 index 943720451f..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies.impl; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sca.itest.policies.CreditCard; -import org.apache.tuscany.sca.itest.policies.Customer; -import org.apache.tuscany.sca.itest.policies.CustomerRegistry; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * - */ -@Service(CustomerRegistry.class) -@Scope("COMPOSITE") -public class CustomerRegistryImpl implements CustomerRegistry { - private Map customers = new HashMap(); - - - @Init - public void init() { - Customer c1 = new Customer(); - c1.setId("001"); - c1.setName("John Smith"); - CreditCard creditCard = new CreditCard(); - creditCard.setNumber("1234-5678-1234"); - creditCard.setType("Visa"); - creditCard.setOwner("John Smith"); - creditCard.setExpMonth(6); - creditCard.setExpYear(2015); - c1.setCreditCard(creditCard); - customers.put(c1.getId(), c1); - - Customer c2 = new Customer(); - c2.setId("002"); - c2.setName("Jane Smith"); - creditCard = new CreditCard(); - creditCard.setNumber("1234-5678-5678"); - creditCard.setType("MasterCard"); - creditCard.setOwner("Jane Smith"); - creditCard.setExpMonth(9); - creditCard.setExpYear(2012); - c2.setCreditCard(creditCard); - customers.put(c2.getId(), c2); - } - - public Customer find(String id) { - return customers.get(id); - } - - @Destroy - public void destroy() { - customers.clear(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java b/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java deleted file mode 100644 index b712b99388..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies.impl; - -import org.apache.tuscany.sca.itest.policies.CreditCard; -import org.apache.tuscany.sca.itest.policies.CreditCardPayment; -import org.apache.tuscany.sca.itest.policies.Customer; -import org.apache.tuscany.sca.itest.policies.CustomerRegistry; -import org.apache.tuscany.sca.itest.policies.Payment; -import org.apache.tuscany.sca.policy.logging.Logging; -import org.oasisopen.sca.annotation.Authentication; -import org.oasisopen.sca.annotation.Confidentiality; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Requires; - -/** - * - */ -@Logging -public class PaymentImpl implements Payment { - - @Reference - protected CustomerRegistry customerRegistry; - - @Reference - @Authentication - @Requires({Confidentiality.CONFIDENTIALITY_MESSAGE, Confidentiality.CONFIDENTIALITY_TRANSPORT}) - protected CreditCardPayment creditCardPayment; - - public String charge(String customerID, float amount) { - Customer customer = customerRegistry.find(customerID); - CreditCard creditCard = customer.getCreditCard(); - String status = creditCardPayment.authorize(creditCard, amount); - return status; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/Customer.composite b/branches/sca-java-2.0-M4/itest/policies/src/main/resources/Customer.composite deleted file mode 100644 index 2a8f598b90..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/Customer.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/LoggingMessages.properties b/branches/sca-java-2.0-M4/itest/policies/src/main/resources/LoggingMessages.properties deleted file mode 100644 index ada808be0e..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/LoggingMessages.properties +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/definitions.xml b/branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/definitions.xml deleted file mode 100644 index 0a39912bf0..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/definitions.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - FINE - LoggingMessages.properties - - - - - - - INFO - LoggingMessages.properties - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index be63597c12..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/Payment.composite b/branches/sca-java-2.0-M4/itest/policies/src/main/resources/Payment.composite deleted file mode 100644 index df54d0c1c2..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/main/resources/Payment.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java b/branches/sca-java-2.0-M4/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java deleted file mode 100644 index 3385ee9071..0000000000 --- a/branches/sca-java-2.0-M4/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.policies; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -public class PaymentTestCase { - private static Node node; - - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("Payment.composite"); - node = NodeFactory.newInstance().createNode(new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - @AfterClass - public static void destroy() throws Exception { - if (node != null) { - node.stop(); - } - } - - @Test - public void testPayment() { - Payment payment = node.getService(Payment.class, "Payment"); - String status = payment.charge("001", 100f); - Assert.assertEquals(CreditCardPayment.COMPLETED, status); - - status = payment.charge("002", 300f); - Assert.assertEquals(CreditCardPayment.REJECTED, status); - } - - public static void main(String[] args) throws Exception { - PaymentTestCase.init(); - PaymentTestCase tester = new PaymentTestCase(); - tester.testPayment(); - PaymentTestCase.destroy(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/pom.xml b/branches/sca-java-2.0-M4/itest/pom.xml deleted file mode 100644 index b8ec15dea7..0000000000 --- a/branches/sca-java-2.0-M4/itest/pom.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M4-SNAPSHOT - ../pom.xml - - tuscany-itest - pom - Apache Tuscany SCA Integration Tests - - - - junit - junit - 4.5 - compile - - - - - - default - - true - - - builder - bpel - callback-api - callback-basic - callback-basic-ws - callback-complex-type - callback-multiple-wires - callback-separatethread - component-type - contribution-folder - contribution-zip - - distribution - exceptions - implementation-spring - interfaces - jms - nodes - - - recursive-multi-level - references - scaclient-api - scopes - scdl - services - service-reference - wires - policies - - - - - old - - bpel - builder - callablereferences - callablereferences-ws - callback-api - callback-basic - callback-complex-type - callback-id - callback-multiple-wires - callback-separatethread - callback-set-callback - callback-set-conversation - component-type - contribution - - contribution-import-export - conversations - conversations-ws - corba - databindings - exceptions - exceptions-cross-binding - exceptions-cross-binding-ws - exceptions-simple-ws - extended-api - interfaces - - jms - jms-args - jms-callbacks - jms-definitions - jms-format - jms-selectors - large-sdo-ws - late-reference-resolution - oneway - operation-overloading - - policy - policy-security - policy-security-basicauth - policy-security-jsr250 - policy-security-token - - properties - recursive - recursive-multi-level - recursive-ws - references - scopes - serialization - services - spring - transaction - validation - wires - wsdl - wsdl2java - wsdlless - wsdl-multiple - ws-void-args-return - - - - - - jaxws - - diff --git a/branches/sca-java-2.0-M4/itest/properties/pom.xml b/branches/sca-java-2.0-M4/itest/properties/pom.xml deleted file mode 100644 index 126d45a6fe..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-properties - Apache Tuscany SCA iTest Properties - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - - xalan - xalan - 2.7.1 - test - - - - org.apache.tuscany.sca - tuscany-core-databinding - 2.0-M4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-databinding-jaxb - 2.0-M4-SNAPSHOT - compile - - - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java deleted file mode 100644 index b0fd64c9da..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mysca.test.myservice.impl; - -public interface MyService { - /** - * This is a method to get the location property value from the sca runtime environment. It is implemented in the - * class MyServiceImpl - */ - String getLocation(); - - /** - * This is a method to get the year property value from the sca runtime environment. It is implemented in the class - * MyServiceImpl - */ - String getYear(); -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java deleted file mode 100644 index 7b44ef02e4..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mysca.test.myservice.impl; - -import java.util.logging.Logger; - -import org.oasisopen.sca.annotation.ComponentName; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface MyService and gives implementation for all methods which are declared in that - * interface. scope is specified as Composite using - * - * @scope annotation. - */ - -@Service(MyService.class) -public class MyServiceImpl implements MyService { - - @Property(name = "location") - protected String location = "RTP"; - - @Property(name = "year") - protected String year = "2006"; - - @ComponentName - protected String componentName; - - private Logger logger; - - /** - * @ to print the message in the log - */ - public MyServiceImpl() { - logger = Logger.getAnonymousLogger(); - logger.info("creating service instance..."); - } - - /** - * @Init annotation to Start the service. Which is executed all the time - */ - @Init - public void start() { - logger.info("Start service.."); - } - - /** - * @Destroy annotation to stop the service. Which is executed in the end - */ - @Destroy - public void stop() { - logger.info("Stop service.."); - - } - - public String getComponentName() { - return componentName; - } - - public String getLocation() { - return location; - } - - public String getYear() { - return year; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java deleted file mode 100644 index e8c4341cf2..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mysca.test.myservice.impl; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This class Implements the interface MyService and gives implementation for all methods which are declared in that - * interface. scope is specified as Composite using - * - * @scope annotation. - */ - -@Service(MyService.class) -public class MyTotalServiceImpl implements MyService { - - // default required==true so it is 1:1 - @Reference - public MyService myService; - - public String getLocation() { - return myService.getLocation(); - } - - public String getYear() { - return myService.getYear(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java deleted file mode 100644 index 68ce5a3cb6..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in ABCDComponentImpl Class - */ -public interface ABCDComponent { - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getA(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getB(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getC(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABCDComponentImpl - */ - String getD(); -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java deleted file mode 100644 index c8d0d4cae4..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -/** - * This class Implements the interface ABCDComponent and gives implementation for all methods which are declared in that - * interface. scope is specified as Composite using - * - * @scope annotation. - */ -@Scope("COMPOSITE") -public class ABCDComponentImpl implements ABCDComponent { - private ABComponent abComponent; - private CDComponent cdComponent; - - /** - * It is a method which injects the property value to the variable 'abComponent' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Reference - public void setAb(ABComponent component) { - this.abComponent = component; - } - - /** - * It is a method which injects the property value to the variable 'cdComponent' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Reference - public void setCd(CDComponent component) { - this.cdComponent = component; - } - - public String getA() { - return this.abComponent.getA(); - } - - public String getB() { - return this.abComponent.getB(); - } - - public String getC() { - return this.cdComponent.getC(); - } - - public String getD() { - return this.cdComponent.getD(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java deleted file mode 100644 index b727935bc1..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.Collection; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in ABComponentImpl Class - */ -@Remotable -public interface ABComponent { - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - - String getA(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - String getB(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - String getZ(); - - /** - * This is a method to get an integer property value from the SCA runtime environment. It is implemented in the - * class ABComponentImpl - */ - int getIntValue(); - - /** - * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class - * ABComponentImpl - */ - String getF(); - - /** - * This is a method to get collection of property values from the SCA runtime environment. It is implemented in the - * class ABComponentImpl - */ - Collection getManyStringValues(); - - /** - * This is a method to get collection of property value from the SCA runtime environment. It is implemented in the - * class ABComponentImpl - */ - Collection getManyIntegers(); -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java deleted file mode 100644 index e402131ce2..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.Collection; - -import org.oasisopen.sca.annotation.Property; - -/** - * This class Implements the interface ABComponent and gives implementation for all methods which are declared in that - * interface. - */ - -public class ABComponentImpl implements ABComponent { - - private String aProperty; - private String bProperty; - private int intValue; - private Collection manyStringValues; - private Collection manyIntegerValues; - private String zProperty; - private String fProperty; - - /** - * It is a method which injects the property value to the variable 'zProperty' from the SCA runtime environment - * using Annotations. - */ - @Property(name = "xpath") - public void setZProperty(final String value) { - this.zProperty = value; - } - - /** - * It is a method which injects collection of property values to the variable 'manyStringValues' from the SCA - * runtime environment using Annotations. - */ - @Property(name = "foobar") - public void setManyStringValues(final Collection value) { - this.manyStringValues = value; - } - - /** - * It is a method which injects collection of integer property values to the variable 'manyIntegerValues' from the - * SCA runtime environment using Annotations. - */ - @Property(name = "fooInts") - public void setManyIntegers(final Collection value) { - this.manyIntegerValues = value; - } - - /** - * It is a method which injects the property value to the variable 'aProperty' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setA(final String A) { - this.aProperty = A; - } - - /** - * It is a method which injects the property value to the variable 'bProperty' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setB(final String B) { - this.bProperty = B; - } - - /** - * It is a method which injects the property value to the variable 'fProperty' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setF(final String F) { - this.fProperty = F; - } - - /** - * It is a method which injects integer property value to the variable 'intValue' from the SCA runtime environment - * using Annotations. - */ - @Property - public void setOne(final int value) { - this.intValue = value; - } - - public String getA() { - return this.aProperty; - } - - public String getB() { - return this.bProperty; - } - - public int getIntValue() { - return this.intValue; - } - - public String getZ() { - return this.zProperty; - } - - public String getF() { - return this.fProperty; - } - - public Collection getManyStringValues() { - return manyStringValues; - } - - public Collection getManyIntegers() { - return manyIntegerValues; - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java deleted file mode 100644 index 52f9871d1b..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.Collection; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in CDComponentImpl Class - */ -public interface CDComponent { - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getC(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getC2(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getD(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getNoSource(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - String getFileProperty(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - Collection getManyValuesFileProperty(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * CDComponentImpl Class - */ - int getOverrideValue(); -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java deleted file mode 100644 index fceda9d9ae..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.Collection; - -import org.oasisopen.sca.annotation.Property; - -/** - * This class Implements the interface CDComponent and gives implementation for all methods which are declared in that - * interface. - */ -public class CDComponentImpl implements CDComponent { - - private String cProperty; - private String dProperty; - private String nosource; - private String fileProperty; - private Collection manyValuesFileProperty; - private int overrideNumber; - private String cProperty2; - - /** - * It is a method which injects the property value to the variable 'cProperty2' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property(name = "nonFileProperty") - public void setC2(final String value) { - this.cProperty2 = value; - } - - /** - * It is a method which injects the property value to the variable 'overrideNumber' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property(name = "two") - public void setOverrideNumber(final int value) { - this.overrideNumber = value; - } - - /** - * It is a method which injects the property value to the variable 'fileProperty' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property(name = "fileProperty") - public void setFileProp(final String value) { - this.fileProperty = value; - } - - /** - * It is a method which injects the property value to the variable 'manyValuesFileProperty' from the SCA runtime - * environment using - * - * @Property Annotations. - */ - @Property(name = "manyValuesFileProperty") - public void setFileManyValueProp(final Collection values) { - this.manyValuesFileProperty = values; - } - - /** - * It is a method which injects the property value to the variable 'cProperty' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property - public void setC(final String C) { - this.cProperty = C; - } - - /** - * It is a method which injects the property value to the variable 'dProperty' from the SCA runtime environment - * using - * - * @Property Annotations. - */ - @Property - public void setD(final String D) { - this.dProperty = D; - } - - /** - * It is a method which injects the property value to the variable 'nosource' from the SCA runtime environment using - * - * @Property Annotations. - */ - @Property - public void setNosource(final String value) { - this.nosource = value; - } - - public String getFileProperty() { - return this.fileProperty; - } - - public String getC() { - return this.cProperty; - } - - public String getC2() { - return this.cProperty2; - } - - public String getD() { - return this.dProperty; - } - - public String getNoSource() { - return this.nosource; - } - - public int getOverrideValue() { - return this.overrideNumber; - } - - public Collection getManyValuesFileProperty() { - return this.manyValuesFileProperty; - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java deleted file mode 100644 index 1642ab55f5..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * This is a Java Bean which has setter and getter methods for for the variables used in the property tests. - */ -public class ComplexPropertyBean { - - /** - * Variable declarations - */ - protected int integerNumber = 25; - protected float floatNumber = 50; - protected double doubleNumber = 75; - protected int[] intArray = null; - protected double[] doubleArray = null; - protected String[] stringArray = null; - - ComplexPropertyBean numberSet; - protected ComplexPropertyBean[] numberSetArray = null; - - public ComplexPropertyBean() { - - } - - public double getDoubleNumber() { - return doubleNumber; - } - - /** - * It is a setter method to set a value for the variable doubleNumber - */ - public void setDoubleNumber(double doubleNumber) { - this.doubleNumber = doubleNumber; - } - - /** - * It is a getter method to get a value for the variable floatNumber - */ - public float getFloatNumber() { - return floatNumber; - } - - /** - * It is a setter method to set a value for the variable floatNumber - */ - public void setFloatNumber(float floatNumber) { - this.floatNumber = floatNumber; - } - - /** - * It is a getter method to get a value for the variable floatNumber - */ - public int getIntegerNumber() { - return integerNumber; - } - - /** - * It is a getter method to get a value for the variable integerNumber - */ - public void setIntegerNumber(int integerNumber) { - this.integerNumber = integerNumber; - } - - /** - * It is a getter method to set a value for the variable numberSet - */ - public ComplexPropertyBean getNumberSet() { - return numberSet; - } - - /** - * It is a setter method to set a value for the variable numberSet - */ - public void setNumberSet(ComplexPropertyBean numberSet) { - this.numberSet = numberSet; - } - - /** - * It is a method which implements toString() function - */ - - public String toString() { - return Double.toString(integerNumber) + " - " - + Double.toString(floatNumber) - + " - " - + Double.toString(doubleNumber) - + " \n" - + ((intArray == null) ? "" : intArray[0] + " - " + intArray[1] + " \n ") - + ((doubleArray == null) ? "" : doubleArray[0] + " - " + doubleArray[1] + " \n ") - + ((stringArray == null) ? "" : stringArray[0] + " - " + stringArray[1] + " \n ") - + ((numberSetArray == null) ? "" : numberSetArray[0] + " - " + numberSetArray[1] + " \n ") - + ((numberSet == null) ? "" : numberSet.toString()); - } - - /** - * It is a setter method to set values for the variable stringArray - */ - public String[] getStringArray() { - return stringArray; - } - - /** - * It is a setter method to set values for the variable stringArray - */ - public void setStringArray(String[] stringArray) { - this.stringArray = stringArray; - } - - public int[] getIntArray() { - return intArray; - } - - public void setIntArray(int[] intArray) { - this.intArray = intArray; - } - - public double[] getDoubleArray() { - return doubleArray; - } - - public void setDoubleArray(double[] doubleArray) { - this.doubleArray = doubleArray; - } - - public ComplexPropertyBean[] getNumberSetArray() { - return numberSetArray; - } - - public void setNumberSetArray(ComplexPropertyBean[] numberSetArray) { - this.numberSetArray = numberSetArray; - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java deleted file mode 100644 index acd1f26670..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * This is an Interface for the services - */ -public interface OverrideService { - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java deleted file mode 100644 index 71dce41efc..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * An implementation for the interface OverrideService. - */ - -public class OverrideServiceImpl implements OverrideService { - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java deleted file mode 100644 index 9c7e8c3447..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.Collection; - -import test.jaxb.props.ReturnCodeProperties; - -/** - * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this - * interface. Implementation for these methods is provided in PropertyComponentImpl Class - */ -public interface PropertyComponent { - - /** - * This is a method to get a value for a property name 'location' from the SCA runtime environment. It is - * implemented in the class PropertyComponentImpl - */ - public String getLocation(); - - /** - * This is a method to get a value for a property name 'year' from the SCA runtime environment. It is implemented in - * the class PropertyComponentImpl - */ - public String getYear(); - - /** - * This method is used to test injecting a primitive String Array - * - * @return The injected array - */ - public String[] getDaysOfTheWeek(); - - /** - * This method is used to test injecting an Object Integer Array - * - * @return The injected array - */ - public Integer[] getIntegerNumbers(); - - /** - * This method is used to test injecting an int Array - * - * @return The injected array - */ - public int[] getIntNumbers(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - - public ComplexPropertyBean getComplexPropertyOne(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ComplexPropertyBean getComplexPropertyTwo(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ComplexPropertyBean getComplexPropertyThree(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public Collection getComplexPropertyFour(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - - public ComplexPropertyBean getComplexPropertyFive(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ReturnCodeProperties getComplexJAXBPropertyOne(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public ReturnCodeProperties getComplexJAXBPropertyTwo(); - - /** - * @return - */ - public String getLocationFromComponentContext(); - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java deleted file mode 100644 index 64ca749e9f..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import java.util.Collection; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Property; - -import test.jaxb.props.ReturnCodeProperties; - -/** - * This class Implements the interface PropertyComponent and gives implementation for all methods which are declared in - * that interface. - */ -public class PropertyComponentImpl implements PropertyComponent { - @Context - protected ComponentContext context; - - @Property - protected ComplexPropertyBean complexPropertyOne; - - @Property - protected ComplexPropertyBean complexPropertyTwo; - - @Property - protected ComplexPropertyBean complexPropertyThree; - - @Property - protected Collection complexPropertyFour; - - @Property - protected ComplexPropertyBean complexPropertyFive; - - @Property(name = "location") - protected String location; - - @Property(name = "year") - protected String year; - - @Property(name = "daysOfTheWeek") - protected String[] daysOfTheWeek; - - @Property(name = "integerNumbers") - protected Integer[] integerNumbers; - - @Property(name = "intNumbers") - protected int[] intNumbers; - - @Property - protected ReturnCodeProperties complexJAXBPropertyOne; - - @Property - protected ReturnCodeProperties complexJAXBPropertyTwo; - - public String getLocation() { - return location; - } - - public String getYear() { - return year; - } - - public ComplexPropertyBean getComplexPropertyOne() { - //System.out.println(complexPropertyOne); - return complexPropertyOne; - } - - public ComplexPropertyBean getComplexPropertyTwo() { - //System.out.println(complexPropertyTwo); - return complexPropertyTwo; - } - - public ComplexPropertyBean getComplexPropertyThree() { - //System.out.println(complexPropertyThree); - return complexPropertyThree; - } - - public Collection getComplexPropertyFour() { - //System.out.println(complexPropertyThree); - return complexPropertyFour; - } - - public ComplexPropertyBean getComplexPropertyFive() { - return complexPropertyFive; - } - - /** - * This method is used to test injecting an Array - * - * @return The injected array - */ - public String[] getDaysOfTheWeek() { - return daysOfTheWeek; - } - - /** - * This method is used to test injecting an Object Integer Array - * - * @return The injected array - */ - public Integer[] getIntegerNumbers() { - return integerNumbers; - } - - /** - * This method is used to test injecting an int Array - * - * @return The injected array - */ - public int[] getIntNumbers() { - return intNumbers; - } - - public String getLocationFromComponentContext() { - return context.getProperty(String.class, "location"); - } - - public ReturnCodeProperties getComplexJAXBPropertyOne() { - return complexJAXBPropertyOne; - } - - public ReturnCodeProperties getComplexJAXBPropertyTwo() { - return complexJAXBPropertyTwo; - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java deleted file mode 100644 index a57ccd90c8..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -/** - * This is an Interface for the services. - */ -public interface PropertyService { - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java deleted file mode 100644 index c147a2affe..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.cdi; - -public interface Bar { - public String getBar(); -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java deleted file mode 100644 index 7c700903d6..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.cdi; - -import org.oasisopen.sca.annotation.Constructor; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(Bar.class) -public class Foo1 implements Bar { - - @Property - protected String bar; - - @Constructor( {"bar"}) - public Foo1(String b) { - this.bar = b; - } - - public String getBar() { - return this.bar; - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java deleted file mode 100644 index 1d2e563095..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.cdi; - -import org.oasisopen.sca.annotation.Constructor; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(Bar.class) -public class Foo2 implements Bar { - - protected String bar; - - @Constructor - public Foo2(@Property(name = "bar") String b) { - this.bar = b; - } - - public String getBar() { - return this.bar; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java deleted file mode 100644 index 54082e297a..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.cdi; - -import org.oasisopen.sca.annotation.Constructor; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(Bar.class) -public class Foo3 implements Bar { - - protected String bar; - - @Constructor - public Foo3() { - this.bar = "bar"; - } - - public String getBar() { - return this.bar; - } - - @Property(name = "bar") - public void setBar(String b) { - this.bar = b; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java deleted file mode 100644 index 15fb49ea4e..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2008.06.07 at 03:30:47 PM EDT -// -package test.jaxb.props; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the test.jaxb.props package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _MyRCProps_QNAME = new QName("http://test.sca.jaxb/rcprops", "MyRCProps"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: test.jaxb.props - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link ReturnCodeProperties } - * - */ - public ReturnCodeProperties createReturnCodeProperties() { - return new ReturnCodeProperties(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ReturnCodeProperties }{@code >}} - * - */ - @XmlElementDecl(namespace = "http://test.sca.jaxb/rcprops", name = "MyRCProps") - public JAXBElement createMyRCProps(ReturnCodeProperties value) { - return new JAXBElement(_MyRCProps_QNAME, ReturnCodeProperties.class, null, value); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java deleted file mode 100644 index 0a1d4a34a3..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2008.06.07 at 03:30:47 PM EDT -// -package test.jaxb.props; - -import java.math.BigInteger; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

Java class for ReturnCodeProperties complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ReturnCodeProperties">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="AInt" type="{http://www.w3.org/2001/XMLSchema}int"/>
- *         <element name="BInteger" type="{http://www.w3.org/2001/XMLSchema}integer"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ReturnCodeProperties", namespace = "http://test.sca.jaxb/rcprops", propOrder = {"a", "b"}) -public class ReturnCodeProperties { - - @XmlElement(name = "AInt") - protected int a; - @XmlElement(name = "BInteger", required = true) - protected BigInteger b; - - /** - * Gets the value of the a property. - * - */ - public int getA() { - return a; - } - - /** - * Sets the value of the a property. - * - */ - public void setA(int value) { - this.a = value; - } - - /** - * Gets the value of the b property. - * - * @return - * possible object is - * {@link BigInteger } - * - */ - public BigInteger getB() { - return b; - } - - /** - * Sets the value of the b property. - * - * @param value - * allowed object is - * {@link BigInteger } - * - */ - public void setB(BigInteger value) { - this.b = value; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/package-info.java b/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/package-info.java deleted file mode 100644 index 6a6fdd00cc..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/java/test/jaxb/props/package-info.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2008.06.07 at 03:30:47 PM EDT -// -@javax.xml.bind.annotation.XmlSchema(namespace = "http://test.sca.jaxb/rcprops", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package test.jaxb.props; - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/ConstructorPropertyInjection.composite b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/ConstructorPropertyInjection.composite deleted file mode 100644 index af65f887c0..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/ConstructorPropertyInjection.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - fubar - - - - - - fubar - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/Outer.composite b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/Outer.composite deleted file mode 100644 index 5e767b1e0e..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/Outer.composite +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Raleigh - 2008 - - - - - - - - - - - - - - - Durham - 2009 - - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/OuterPropertyTest.composite b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/OuterPropertyTest.composite deleted file mode 100644 index 95ee1157bf..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/OuterPropertyTest.composite +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - 125 - - - Overriden A - Overriden B - Overriden C - Overriden D - - Overriden Y - Overriden Z - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/PropertyTest.composite b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/PropertyTest.composite deleted file mode 100644 index 36f75d52a1..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/PropertyTest.composite +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - 1 - - - a - b - c - d - - y - z - - - - - - - - 1 - 11 - 111 - - - 2 - 22 - 222 - - TestString_1 - TestString_2 - 10 - 20 - 27 - 79.34 - 184.52 - 50.05 - 25.52 - - 54 - 158.68 - 369.04 - - - - - - - TestString_3 - TestString_4 - 100 - 200 - - - - - - - - - - - - - - f - - - - Apache - Tuscany - Java SCA - - - 123 - 456 - 789 - - - - - - - - - aValue - - - - 25 - - - - - - - - TestString_1 - TestString_2 - 10 - 27 - 79.34 - 25.52 - 184.52 - 50.05 - 20 - - 1 - 11 - 111 - - - 2 - 22 - 222 - - - 54 - 158.68 - 369.04 - - - - - - TestElementString_1 - TestElementString_2 - 10 - 27 - 79.34 - 25.52 - 184.52 - 50.05 - 20 - - 1 - 11 - 111 - - - 2 - 22 - 222 - - - 54 - 158.68 - 369.04 - - - - - - 1 - 11.11 - 111.111 - - 11 - 1111.1111 - 11111.11111 - - - - 2 - 22.22 - 222.222 - - 22 - 2222.2222 - 22222.22222 - - - - 3 - 33.33 - 333.333 - - 33 - 3333.3333 - 33333.33333 - - - - - RTP - 2006 - - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday - - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - - - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 - 0 - - - - - 10 - 10 - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/customer.xsd b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/customer.xsd deleted file mode 100644 index 7421750f1b..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/customer.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/fileProperty.txt b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/fileProperty.txt deleted file mode 100644 index 0d3d9ead83..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/fileProperty.txt +++ /dev/null @@ -1,21 +0,0 @@ - - - -fileValue diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/manyValuesFileProperty.txt b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/manyValuesFileProperty.txt deleted file mode 100644 index 6d4180ee2f..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/manyValuesFileProperty.txt +++ /dev/null @@ -1,23 +0,0 @@ - - -fileValueOne -fileValueTwo -fileValueThree -fileValueFour diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/mySimpleService.composite b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/mySimpleService.composite deleted file mode 100644 index 3cf25384e6..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/mySimpleService.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - Raleigh - 2008 - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcProps.txt b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcProps.txt deleted file mode 100644 index 052c291fd0..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcProps.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - - 20 - 20 - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcprops.xsd b/branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcprops.xsd deleted file mode 100644 index 21289fa7b2..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/main/resources/rcprops.xsd +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java b/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java deleted file mode 100644 index efc635c72b..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import static org.junit.Assert.assertEquals; -import mysca.test.myservice.impl.MyService; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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 MyTotalServiceTestCase { - private static MyService service1; - private static MyService service2; - private static MyService service3; - - private static Node node; - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the local - * property variables defined in the implementation file with the expected values 'RTP' and '2006' - */ - @Test - public void testPropertyDefault() { - assertEquals("RTP", service1.getLocation()); - assertEquals("2006", service1.getYear()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using service2 from the SCA runtime environment with the expected values 'Raleigh' - * and '2008'. This overrides the local property values - */ - @Test - public void testPropertyOverride() { - assertEquals("Raleigh", service2.getLocation()); - assertEquals("2008", service2.getYear()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using service3 from the SCA runtime environment with the expected values 'Durham' - * and '2009' - */ - @Test - public void testPropertyNestedOverride() { - assertEquals("Durham", service3.getLocation()); - assertEquals("2009", service3.getYear()); - } - - /** - * Method annotated with - * - * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test - * Embedded SCA node, to start the SCA node and to get a reference to the 'outerABService' service - */ - @BeforeClass - public static void setUp() throws Exception { - - String location = ContributionLocationHelper.getContributionLocation("Outer.composite"); - node = NodeFactory.newInstance().createNode("Outer.composite", new Contribution("c1", location)); - node.start(); - service1 = node.getService(MyService.class, "MyServiceComponent/MyService"); - service2 = node.getService(MyService.class, "MyServiceComponentNew/MyService"); - service3 = node.getService(MyService.class, "MySimpleServiceInRecursiveAnother"); - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void tearDown() { - node.stop(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java b/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java deleted file mode 100644 index 0906a45ab3..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import static org.junit.Assert.assertEquals; - -import java.util.Iterator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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 is a class which makes user of JUnit Framework, all tests are written using JUnit notation. These tests are used - * to test different property values returned from the SCA Runtime Environment which is initialized with the composite - * 'OuterPropertyTest.composite'. It basically tests the Simple type of property and Complex type of property from the - * SCA Runtime Environment. - */ -public class OuterPropertyTestCase { - - private static Node node; - private static ABComponent outerABService; - - /** - * Method annotated with - * - * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test - * Embedded SCA node, to start the SCA node and to get a reference to the 'outerABService' service - */ - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("OuterPropertyTest.composite"); - node = NodeFactory.newInstance().createNode("OuterPropertyTest.composite", new Contribution("c1", location)); - node.start(); - outerABService = node.getService(ABComponent.class, "OuterComponent"); - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * A' - */ - @Test - public void testOverridenA() { - assertEquals("Overriden A", outerABService.getA()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * B' - */ - @Test - public void testOverridenB() { - assertEquals("Overriden B", outerABService.getB()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * A' - */ - @Test - public void testOverridenF() { - assertEquals("Overriden A", outerABService.getF()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden - * Z' - */ - @Test - public void testOverridenZ() { - assertEquals("Overriden Z", outerABService.getZ()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 125 - */ - @Test - public void testOverridenIntValue() { - assertEquals(125, outerABService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 125 - */ - @Test - public void testDefaultValue() { - assertEquals(125, outerABService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'Apache' , - * 'Tuscany' and 'Java SCA' respectively . - */ - @Test - public void testManySimpleStringValues() { - Iterator iterator = outerABService.getManyStringValues().iterator(); - assertEquals("Apache", iterator.next()); - assertEquals("Tuscany", iterator.next()); - assertEquals("Java SCA", iterator.next()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 123, 456 - * and 789 - */ - @Test - public void testManySimpleIntegerValues() { - Iterator iterator = outerABService.getManyIntegers().iterator(); - assertEquals(123, iterator.next().intValue()); - assertEquals(456, iterator.next().intValue()); - assertEquals(789, iterator.next().intValue()); - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java b/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java deleted file mode 100644 index eb217600db..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.math.BigInteger; -import java.util.Arrays; -import java.util.Iterator; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import test.jaxb.props.ReturnCodeProperties; - -/** - * This is a class which makes user of JUnit Framework, all tests are written using JUnit notation. These tests are used - * to test different property values returned from the SCA Runtime Environment which is initialized with the composite - * 'PropertyTest.composite'. It basically tests all types of property values returned from SCA runtime environment. - */ -public class PropertyTestCase { - private static Node node; - private static ABComponent abService; - private static CDComponent cdService; - private static ABCDComponent abcdService; - private static PropertyComponent propertyService; - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'a' - */ - @Test - public void testA() { - assertEquals("a", abService.getA()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'b' - */ - @Test - public void testB() { - assertEquals("b", abService.getB()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'c' - */ - @Test - public void testC() { - assertEquals("c", cdService.getC()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'c' - */ - @Test - public void testC2() { - assertEquals("c", cdService.getC2()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'd' - */ - @Test - public void testD() { - assertEquals("d", cdService.getD()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'a' - */ - @Test - public void testF() { - assertEquals("a", abService.getF()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'z' - */ - @Test - public void testZ() { - assertEquals("z", abService.getZ()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 1. - */ - @Test - public void testIntValue() { - assertEquals(1, abService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 1. - */ - @Test - public void testDefaultValue() { - assertEquals(1, abService.getIntValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 1. - */ - @Test - public void testDefaultValueOverride() { - assertEquals(1, cdService.getOverrideValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value 'aValue' - */ - @Test - public void testNoSource() { - assertEquals("aValue", cdService.getNoSource()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property value obtained using a service from the SCA runtime environment with the expected value - * 'fileValue' - */ - @Test - public void testFileProperty() { - assertEquals("fileValue", cdService.getFileProperty()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 4 and - * 'fileValueTwo' respectively. - */ - @Test - public void testManyValuesFileProperty() { - Iterator iterator = cdService.getManyValuesFileProperty().iterator(); - iterator.next(); - String secondValue = iterator.next(); - assertEquals(4, cdService.getManyValuesFileProperty().size()); - assertEquals("fileValueTwo", secondValue); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'a' , - * 'b', 'c' and 'd' respectively. - */ - @Test - public void testABCD() { - assertEquals("a", abcdService.getA()); - assertEquals("b", abcdService.getB()); - assertEquals("c", abcdService.getC()); - assertEquals("d", abcdService.getD()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'RTP' - * and '2006' respectively - */ - @Test - public void testDefaultProperty() { - assertEquals("RTP", propertyService.getLocation()); - assertEquals("2006", propertyService.getYear()); - - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 'Apache' , - * 'Tuscany' and 'Java SCA' respectively . - */ - @Test - public void testManySimpleStringValues() { - Iterator iterator = abService.getManyStringValues().iterator(); - assertEquals("Apache", iterator.next()); - assertEquals("Tuscany", iterator.next()); - assertEquals("Java SCA", iterator.next()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values 123, 456 - * and 789 respectively. - */ - @Test - public void testManySimpleIntegerValues() { - Iterator iterator = abService.getManyIntegers().iterator(); - assertEquals(123, iterator.next().intValue()); - assertEquals(456, iterator.next().intValue()); - assertEquals(789, iterator.next().intValue()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values - * 'TestString_1' and 2 respectively. - */ - @Test - public void testComplexPropertyOne() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyOne(); - assertNotNull(propBean); - assertEquals("TestString_1", propBean.getStringArray()[0]); - assertEquals(2, propBean.numberSetArray[1].integerNumber); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected integer number - * and a float number - */ - @Test - public void testComplexPropertyTwo() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyTwo(); - assertNotNull(propBean); - assertEquals(10, propBean.intArray[0]); - assertEquals((float)22, propBean.numberSetArray[1].floatNumber); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected value first - * element in the string array and the float number - */ - @Test - public void testComplexPropertyThree() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyThree(); - assertNotNull(propBean); - assertEquals("TestElementString_1", propBean.stringArray[0]); - assertEquals((float)22, propBean.numberSetArray[1].floatNumber); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * complex property value obtained using a service from the SCA runtime environment with the expected values - * 1, 222.222 and 33 respectively. - */ - @Test - public void testComplexPropertyFour() { - Object[] propBeanCollection = propertyService.getComplexPropertyFour().toArray(); - assertNotNull(propBeanCollection); - assertEquals(1, ((ComplexPropertyBean)propBeanCollection[0]).getIntegerNumber()); - assertEquals(222.222, ((ComplexPropertyBean)propBeanCollection[1]).getDoubleNumber()); - assertEquals(33, ((ComplexPropertyBean)propBeanCollection[2]).getNumberSet().getIntegerNumber()); - } - - /** - * Method annotated with - * - * @Test is a test method where testing logic is written using various assert methods. This test verifies the - * property values obtained using a service from the SCA runtime environment with the expected values - * 'TestString_3', 'TestString_4', 100 and 200. - */ - @Test - public void testComplexPropertyFive() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyFive(); - assertNotNull(propBean); - assertEquals("TestString_3", propBean.getStringArray()[0]); - assertEquals("TestString_4", propBean.getStringArray()[1]); - assertEquals(100, propBean.getIntArray()[0]); - assertEquals(200, propBean.getIntArray()[1]); - } - - @Test - public void testGetLocationFromComponentContext() { - String location = propertyService.getLocation(); - assertNotNull(location); - String locationFromCC = propertyService.getLocationFromComponentContext(); - assertNotNull(locationFromCC); - assertEquals(location, locationFromCC); - } - - @Test - public void testGetInjectedStringArrayProperty() { - String[] daysOfWeek = propertyService.getDaysOfTheWeek(); - assertNotNull(daysOfWeek); - - String[] expected = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}; - Assert.assertTrue(Arrays.equals(expected, daysOfWeek)); - } - - @Test - public void testGetInjectedIntegerArrayProperty() { - Integer[] numbers = propertyService.getIntegerNumbers(); - assertNotNull(numbers); - - Integer[] expected = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - Assert.assertTrue(Arrays.equals(expected, numbers)); - } - - @Test - public void testGetInjectedIntArrayProperty() { - int[] numbers = propertyService.getIntNumbers(); - assertNotNull(numbers); - - int[] expected = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; - Assert.assertTrue(Arrays.equals(expected, numbers)); - } - - @Test - public void testComplexJAXBProperty() { - ReturnCodeProperties rc = propertyService.getComplexJAXBPropertyOne(); - assertEquals(10, rc.getA()); - assertEquals(new BigInteger("10"), rc.getB()); - } - - @Test - public void testComplexJAXBPropertyFromFile() { - ReturnCodeProperties rc = propertyService.getComplexJAXBPropertyTwo(); - System.out.println("SKSK: a =" + rc.getA()); - System.out.println("SKSK: b =" + rc.getB()); - assertEquals(20, rc.getA()); - assertEquals(new BigInteger("20"), rc.getB()); - } - - /** - * Method annotated with - * - * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test - * Embedded SCA node, to start the SCA node and to get a reference to 4 services namely 'abService' - * service, 'cdService' service, 'abcdService' service and 'propertyService' service - */ - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("PropertyTest.composite"); - node = NodeFactory.newInstance().createNode("PropertyTest.composite", new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - e.printStackTrace(); - } - abService = node.getService(ABComponent.class, "ABComponent"); - cdService = node.getService(CDComponent.class, "CDComponent"); - abcdService = node.getService(ABCDComponent.class, "ABCDComponent"); - propertyService = node.getService(PropertyComponent.class, "PropertyComponent"); - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java b/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java deleted file mode 100644 index a0213ced46..0000000000 --- a/branches/sca-java-2.0-M4/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.cdi; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ConstructorPropertyInjectionTestCase { - private static org.apache.tuscany.sca.node.Node node; - - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("ConstructorPropertyInjection.composite"); - node = NodeFactory.newInstance().createNode("ConstructorPropertyInjection.composite", new Contribution("c1", location)); - node.start(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Method annotated with - * - * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the - * node, close any previously opened connections etc - */ - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testFoo1() throws Exception { - Bar foo = node.getService(Bar.class, "Foo1Component"); - assertEquals("fubar", foo.getBar()); - } - - @Test - public void testFoo2() throws Exception { - Bar foo = node.getService(Bar.class, "Foo2Component"); - assertEquals("fubar", foo.getBar()); - } - - @Test - public void testFoo3() throws Exception { - Bar foo = node.getService(Bar.class, "Foo3Component"); - assertEquals("fubar", foo.getBar()); - } -} diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/pom.xml b/branches/sca-java-2.0-M4/itest/recursive-multi-level/pom.xml deleted file mode 100644 index c82860fb74..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - - - itest-recursive-multi-level - Apache Tuscany SCA iTest Recusive Multi-Level - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - - xalan - xalan - 2.7.1 - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java deleted file mode 100644 index 986c8305dd..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mysca.test.myservice; - -public interface MyService { - String getLocation(); - - String getYear(); -} diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java deleted file mode 100644 index 6cad998042..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mysca.test.myservice; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Service; - -@Service(MyService.class) -public class MyServiceImpl implements MyService { - - @Property(name = "location") - protected String location = "ABC"; - - @Property(name = "year") - protected String year = "2006"; - - public String getLocation() { - return location; - } - - public String getYear() { - return year; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java deleted file mode 100644 index 261eff2584..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mysca.test.myservice; - -public interface MySimpleTotalService { - String getLocation(); - - String getYear(); -} diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java deleted file mode 100644 index f3c9280f96..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 mysca.test.myservice; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(MySimpleTotalService.class) -public class MySimpleTotalServiceImpl implements MySimpleTotalService { - // default required==true so it is 1:1 - @Reference - public MyService myService; - - public String getLocation() { - return myService.getLocation(); - } - - public String getYear() { - return myService.getYear(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite deleted file mode 100644 index 090bc49a41..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Level 1 - 2001 - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite deleted file mode 100644 index 8c1a9a2f72..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Level 2 - 2002 - - - - Default 2 - 1992 - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite deleted file mode 100644 index 884a8b0a96..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Level 3 - 2003 - - - - Default 3 - 1993 - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java b/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java deleted file mode 100644 index b9b4e3ba7c..0000000000 --- a/branches/sca-java-2.0-M4/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.sca.tests; - -import static org.junit.Assert.assertEquals; -import mysca.test.myservice.MySimpleTotalService; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -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; - -/** - * Tests to make sure that autowiring and recusive composite work together - * - */ -public class MultiLevelTestCase { - private static Node node1; - private static Node node2; - private static Node node3; - private static MySimpleTotalService myService1; - private static MySimpleTotalService myService2; - private static MySimpleTotalService myService3; - - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("TotalService1Auto.composite"); - Contribution contribution = new Contribution("c1", location); - try { - node1 = NodeFactory.newInstance().createNode("TotalService1Auto.composite", contribution); - } catch (Exception e) { - e.printStackTrace(); - } - node2 = NodeFactory.newInstance().createNode("TotalService2Auto.composite", contribution); - node3 = NodeFactory.newInstance().createNode("TotalService3Auto.composite", contribution); - - node1.start(); - node2.start(); - node3.start(); - - myService1 = node1.getService(MySimpleTotalService.class, "TotalServiceComponentLevel1Auto"); - myService2 = node2.getService(MySimpleTotalService.class, "TotalServiceInRecursive2Auto/MyServiceLevel1Auto"); - myService3 = node3.getService(MySimpleTotalService.class, "TotalServiceInRecursive3Auto/MyServiceLevel2Auto"); - } - - @Test - public void testLevel1() { - assertEquals("Level 1", myService1.getLocation()); - assertEquals("2001", myService1.getYear()); - } - - @Test - public void testLevel2() { - assertEquals("Default 2", myService2.getLocation()); - assertEquals("1992", myService2.getYear()); - } - - @Test - public void testLevel3() { - assertEquals("Default 3", myService3.getLocation()); - assertEquals("1993", myService3.getYear()); - } - - @AfterClass - public static void tearDown() { - node1.stop(); - node2.stop(); - node3.stop(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/references/pom.xml b/branches/sca-java-2.0-M4/itest/references/pom.xml deleted file mode 100644 index 1c543e50ba..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-references - Apache Tuscany SCA iTest References - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java deleted file mode 100644 index f8c0850118..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -public interface AComponent { - - String fooB(); - - String fooC(); - - String fooBC(); - - String fooD1(); - - String fooD2(); - - String fooMultipleD(); - - String fooMultipleDArray(); - - String fooMultipleDServiceRef(); - - DComponent getDReference(); -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java deleted file mode 100644 index cd0aad3eea..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -import java.util.Collection; -import java.util.List; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Reference; - -public class AComponentImpl implements AComponent { - - @Reference(name = "bReference") - protected BComponent b; - - @Reference - private CComponent cReference; - - @Reference(required = false) - protected DComponent dReference; - - @Reference(name = "dReferences") - public Collection dReferences; - - @Reference(name = "dReferenceArray") - public DComponent[] dReferenceArray; - - @Reference(name = "dServiceReferences") - public List> dServiceReferences; - - private DComponent dReference1; - - private DComponent dReference2; - - @Reference(name = "dReference1", required = false) - public void setDReference(DComponent dReference) { - this.dReference1 = dReference; - } - - @Reference - public void setDReference2(DComponent dReference2) { - this.dReference2 = dReference2; - } - - public String fooB() { - return b.bFoo(); - } - - public String fooC() { - return cReference.cFoo(); - } - - public String fooBC() { - return b.fooC(); - } - - public String fooD() { - return dReference1.dFoo(); - } - - public String fooD1() { - return dReference1.dFoo(); - } - - public String fooD2() { - return dReference2.dFoo(); - } - - public String fooMultipleDArray() { - StringBuffer str = new StringBuffer(); - for (DComponent d : dReferenceArray) { - str.append(d.getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public String fooMultipleD() { - StringBuffer str = new StringBuffer(); - for (DComponent d : dReferences) { - str.append(d.getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public String fooMultipleDServiceRef() { - StringBuffer str = new StringBuffer(); - for (ServiceReference d : dServiceReferences) { - str.append(d.getService().getComponentName()); - str.append(','); - } - if (str.length() > 0) { - str.deleteCharAt(str.length() - 1); - } - return str.toString(); - } - - public DComponent getDReference() { - return dReference; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java deleted file mode 100644 index 785920bb2d..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -public interface BComponent { - - String bFoo(); - - String fooC(); -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java deleted file mode 100644 index 211e6160f6..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -import org.oasisopen.sca.annotation.Reference; - -public class BComponentImpl implements BComponent { - - protected CComponent cReference; - - public BComponentImpl(@Reference(name = "cReference") CComponent cReference) { - this.cReference = cReference; - } - - public String bFoo() { - return "BComponent"; - } - - public String fooC() { - return "B" + cReference.cFoo(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java deleted file mode 100644 index 47a1f9bde8..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -import org.oasisopen.sca.annotation.Reference; - -public class BComponentWrongTargetImpl implements BComponent { - - protected CComponent cReference; - - public BComponentWrongTargetImpl(@Reference(name = "cReference") CComponent cReference) { - this.cReference = cReference; - } - - public String bFoo() { - return "BComponentWrongTarget"; - } - - public String fooC() { - return "B" + cReference.cFoo(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java deleted file mode 100644 index d436c28adc..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -public interface CComponent { - - String cFoo(); -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java deleted file mode 100644 index a1823e1cdc..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -public class CComponentImpl implements CComponent { - - public String cFoo() { - return "CComponent"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java deleted file mode 100644 index 80617bdec2..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -public interface DComponent { - - String dFoo(); - - String getComponentName(); -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java b/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java deleted file mode 100644 index d181ac96ca..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -import org.oasisopen.sca.annotation.ComponentName; - -public class DComponentImpl implements DComponent { - @ComponentName - public String name; - - public String dFoo() { - return "DComponent"; - } - - public String getComponentName() { - return name; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/resources/AutoWiredReferencesTest.composite b/branches/sca-java-2.0-M4/itest/references/src/main/resources/AutoWiredReferencesTest.composite deleted file mode 100644 index 3934025e64..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/resources/AutoWiredReferencesTest.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/resources/InnerReferencesTest.composite b/branches/sca-java-2.0-M4/itest/references/src/main/resources/InnerReferencesTest.composite deleted file mode 100644 index 871a846edf..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/resources/InnerReferencesTest.composite +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/references/src/main/resources/ManualWiredReferencesTest.composite b/branches/sca-java-2.0-M4/itest/references/src/main/resources/ManualWiredReferencesTest.composite deleted file mode 100644 index 52d6fe48c1..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/main/resources/ManualWiredReferencesTest.composite +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java b/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java deleted file mode 100644 index 76264d308f..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.ServiceUnavailableException; - -public class AutoWiredReferenceTestCase { - private static Node node; - private static AComponent acomponent; - private static AComponent acomponentAutowire; - - @BeforeClass - public static void init() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("AutoWiredReferencesTest.composite"); - node = - NodeFactory.newInstance().createNode("AutoWiredReferencesTest.composite", - new Contribution("c1", location)); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - acomponentAutowire = node.getService(AComponent.class, "AComponentAutowire"); - } catch (Throwable e) { - e.printStackTrace(); - } - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test(expected = Exception.class) - public void testD1Reference() { - acomponent.fooD1(); - } - - @Test - public void testD2Reference() { - assertEquals("DComponent", acomponent.fooD2()); - } - - @Test - public void testMultiDReferenceArray() { - String components = acomponent.fooMultipleDArray(); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testMultiDServiceReference() { - String components = acomponent.fooMultipleDServiceRef(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.getDReference().dFoo(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - - @Test - public void testTargetPrecendence() { - try { - assertEquals("BComponent", acomponentAutowire.fooB()); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java b/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java deleted file mode 100644 index 6e4212fd9a..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -public class InnerReferenceTestCase { - private static Node node; - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("InnerReferencesTest.composite"); - node = NodeFactory.newInstance().createNode("InnerReferencesTest.composite", new Contribution("c1", location)); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testD1Reference() { - assertEquals("DComponent", acomponent.fooD1()); - } - - @Test - public void testD2Reference() { - assertEquals("DComponent", acomponent.fooD2()); - } - - @Test - public void testMultiDReference() { - String components = acomponent.fooMultipleD(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testMultiDReferenceArray() { - String components = acomponent.fooMultipleDArray(); - Assert.assertTrue(components.equals("DComponent1")); - } - - @Test - public void testMultiDServiceReference() { - String components = acomponent.fooMultipleDServiceRef(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test(expected = Exception.class) - public void testRequiredFalseReference() { - acomponent.getDReference().dFoo(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java b/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java deleted file mode 100644 index 2fce95401e..0000000000 --- a/branches/sca-java-2.0-M4/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.references; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -public class ManualWiredReferenceTestCase { - private static Node node; - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("ManualWiredReferencesTest.composite"); - node = NodeFactory.newInstance().createNode("ManualWiredReferencesTest.composite", new Contribution("c1", location)); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testD1Reference() { - acomponent.fooD1(); - } - - @Test - public void testD2Reference() { - assertEquals("DComponent", acomponent.fooD2()); - } - - @Test - public void testMultiDReferenceArray() { - String components = acomponent.fooMultipleDArray(); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testMultiDServiceReference() { - String components = acomponent.fooMultipleDServiceRef(); - Assert.assertTrue(components.contains("DComponent")); - Assert.assertTrue(components.contains("DComponent1")); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.getDReference().dFoo(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/scaclient-api/pom.xml b/branches/sca-java-2.0-M4/itest/scaclient-api/pom.xml deleted file mode 100644 index de34473c63..0000000000 --- a/branches/sca-java-2.0-M4/itest/scaclient-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-scaclient-api - Apache Tuscany SCA iTest SCAClient API - - - - org.apache.tuscany.sca - tuscany-sca-client-impl - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - runtime - - - - diff --git a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldService.java b/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldService.java deleted file mode 100644 index 1c7edaefb6..0000000000 --- a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java b/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java deleted file mode 100644 index 4b9910bb21..0000000000 --- a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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(sayHello("world")); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/Helloworld.composite b/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/Helloworld.composite deleted file mode 100644 index 3f0e0a164c..0000000000 --- a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/Helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d8604a5cc0..0000000000 --- a/branches/sca-java-2.0-M4/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java b/branches/sca-java-2.0-M4/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java deleted file mode 100644 index a331e4dd22..0000000000 --- a/branches/sca-java-2.0-M4/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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 junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.oasisopen.sca.client.SCAClient; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev$ $Date$ - */ -public class SCAClientTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(); - node.start(); - } - - public void testInvoke() throws Exception { - HelloworldService service = - SCAClientFactory.newInstance(null).getService(HelloworldService.class, "HelloworldComponent"); - assertEquals("Hello petra", service.sayHello("petra")); - } - - public void testSimpleAPI() throws Exception { - HelloworldService service = SCAClient.getService(HelloworldService.class, "/HelloworldComponent"); - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/scdl/pom.xml b/branches/sca-java-2.0-M4/itest/scdl/pom.xml deleted file mode 100644 index d0ccbfb131..0000000000 --- a/branches/sca-java-2.0-M4/itest/scdl/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - - itest-scdl - Apache Tuscany SCA iTest SCDL - - - - org.apache.tuscany.sca - tuscany-deployment - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-implementation-java - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-jsonp - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-rmi - 2.0-M4-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-binding-jms - 2.0-M4-SNAPSHOT - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - compile - - copy-dependencies - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java b/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java deleted file mode 100644 index c56545dd3b..0000000000 --- a/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.scdl; - -import java.io.File; -import java.net.URL; -import java.util.Arrays; -import java.util.List; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.contribution.Contribution; -import org.apache.tuscany.sca.deployment.DefaultDeployer; -import org.apache.tuscany.sca.deployment.Deployer; -import org.apache.tuscany.sca.implementation.java.JavaImplementation; -import org.apache.tuscany.sca.monitor.Monitor; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Test case for reading and writing SCDL - */ -public class ContributionTestCase { - - @Test - public void testRead() throws Exception { - Deployer deployer = new DefaultDeployer(); - File file = new File("../../samples/calculator/target/sample-calculator.jar"); - URL url = file.toURI().toURL(); - Monitor monitor = deployer.createMonitor(); - Contribution contribution = deployer.loadContribution(url.toURI(), url, monitor); - deployer.build(Arrays.asList(contribution), null, monitor); - - // Ferkle around in the contribution verifying it looks as expected - Assert.assertNotNull(contribution); - List deployables = contribution.getDeployables(); - Assert.assertEquals(1, deployables.size()); - Composite calculatorComposte = deployables.get(0); - Assert.assertEquals("Calculator", calculatorComposte.getName().getLocalPart()); - Assert.assertEquals(5, calculatorComposte.getComponents().size()); - Component calcComp = calculatorComposte.getComponent("CalculatorServiceComponent"); - Assert.assertNotNull(calcComp); - Assert.assertEquals(4, calcComp.getReferences().size()); - Reference ref = calcComp.getReference("addService"); - Assert.assertEquals("AddServiceComponent", ref.getTargets().get(0).getName()); - Implementation impl = calcComp.getImplementation(); - Assert.assertTrue(impl instanceof JavaImplementation); - Assert.assertEquals("calculator.CalculatorServiceImpl", ((JavaImplementation)impl).getJavaClass().getName()); - } - - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } -} diff --git a/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java b/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java deleted file mode 100644 index 18fb9394bf..0000000000 --- a/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.scdl; - -import java.net.URL; - -import javax.xml.stream.XMLStreamException; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.binding.jms.JMSBinding; -import org.apache.tuscany.sca.binding.jsonp.JSONPBinding; -import org.apache.tuscany.sca.binding.rmi.RMIBinding; -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.deployment.Deployer; -import org.junit.Test; - -/** - * Test case for reading and writing a composite - */ -public class SCDLTestCase { - - @Test - public void testRead() throws ContributionReadException, XMLStreamException { - ExtensionPointRegistry registry = new DefaultExtensionPointRegistry(); - Deployer deployer = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Deployer.class); - - URL r = getClass().getResource("/test.composite"); - Composite composite = deployer.loadXMLDocument(r, null); - Assert.assertNotNull(composite); - - Component JavaComp = composite.getComponent("JavaComponent"); - Assert.assertNotNull(JavaComp); - - Component bpelComp = composite.getComponent("BPELComponent"); - Assert.assertNotNull(bpelComp); - - Service jsonpService = composite.getService("JSONPService"); - Assert.assertNotNull(jsonpService); - Assert.assertEquals(1, jsonpService.getBindings().size()); - JSONPBinding jsonpBinding = jsonpService.getBinding(JSONPBinding.class); - Assert.assertNotNull(jsonpBinding); - - Service jmsService = composite.getService("JMSService"); - Assert.assertNotNull(jmsService); - Assert.assertEquals(1, jmsService.getBindings().size()); - JMSBinding jmsBinding = jmsService.getBinding(JMSBinding.class); - Assert.assertNotNull(jmsBinding); - - Service rmiService = composite.getService("RMIService"); - Assert.assertNotNull(rmiService); - Assert.assertEquals(1, rmiService.getBindings().size()); - RMIBinding rmiBinding = rmiService.getBinding(RMIBinding.class); - Assert.assertNotNull(rmiBinding); - -// TODO: WS binding drags in entire runtime -// Service wsService = composite.getService("WSService"); -// Assert.assertNotNull(wsService); -// Assert.assertEquals(1, wsService.getBindings().size()); -// WSBinding wsBinding = wsService.getBinding(WSBinding.class); -// Assert.assertNotNull(wsBinding); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java b/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java deleted file mode 100644 index 44695e5dde..0000000000 --- a/branches/sca-java-2.0-M4/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.scdl; - -import java.io.File; - -import junit.framework.Assert; - -import org.junit.Test; - -/** - * Test case for verifying only SCDL jars are needed - * - * Uses maven-dependency-plugin config in the pom.xml - * - * Current required jars are: - * geronimo-stax-api_1.0_spec-1.0.1.jar - * jsr181-api-1.0-MR1.jar - * junit-4.5.jar - * tuscany-assembly-2.0-SNAPSHOT.jar - * tuscany-assembly-xml-2.0-SNAPSHOT.jar - * tuscany-assembly-xsd-2.0-SNAPSHOT.jar - * tuscany-binding-jms-2.0-SNAPSHOT.jar - * tuscany-binding-jsonp-2.0-SNAPSHOT.jar - * tuscany-binding-rmi-2.0-SNAPSHOT.jar - * tuscany-binding-ws-2.0-SNAPSHOT.jar - * tuscany-common-java-2.0-SNAPSHOT.jar - * tuscany-common-xml-2.0-SNAPSHOT.jar - * tuscany-contribution-2.0-SNAPSHOT.jar - * tuscany-extensibility-2.0-SNAPSHOT.jar - * tuscany-implementation-bpel-2.0-SNAPSHOT.jar - * tuscany-implementation-java-2.0-SNAPSHOT.jar - * tuscany-interface-java-2.0-SNAPSHOT.jar - * tuscany-interface-wsdl-2.0-SNAPSHOT.jar - * tuscany-monitor-2.0-SNAPSHOT.jar - * tuscany-sca-api-2.0-SNAPSHOT.jar - * tuscany-scdl-2.0-SNAPSHOT.jar - * tuscany-xsd-2.0-SNAPSHOT.jar - * wsdl4j-1.6.2.jar - * wstx-asl-3.2.4.jar - * XmlSchema-1.4.2.jar - * - * TODO: WS binding drags in all runtime - */ -public class ValidateDependenciesTestCase { - - @Test - public void countDependencies() { - - File dependenciesDir = new File("target/dependency"); - Assert.assertTrue(dependenciesDir.exists()); - - File[] dependencyFiles = dependenciesDir.listFiles(); - Assert.assertEquals(20, dependencyFiles.length); - } -} diff --git a/branches/sca-java-2.0-M4/itest/scdl/src/test/resources/test.composite b/branches/sca-java-2.0-M4/itest/scdl/src/test/resources/test.composite deleted file mode 100644 index aa11c0d092..0000000000 --- a/branches/sca-java-2.0-M4/itest/scdl/src/test/resources/test.composite +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/scopes/pom.xml b/branches/sca-java-2.0-M4/itest/scopes/pom.xml deleted file mode 100644 index 7d8f94d4ea..0000000000 --- a/branches/sca-java-2.0-M4/itest/scopes/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - Apache Tuscany SCA iTest Scopes - itest-scopes - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - - diff --git a/branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java b/branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java deleted file mode 100644 index 208ac3ba44..0000000000 --- a/branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.scopes; - -import org.oasisopen.sca.annotation.Scope; - -/** - * Test Composite scope - */ -@Scope("COMPOSITE") -public class CompositeScopeStateVerifierImpl implements StateVerifier { - - // State data for this module (composite). - // In order to support thread-based state verification, - // the module state needs to be a ThreadLocal. - ThreadLocal moduleState; - - public CompositeScopeStateVerifierImpl() { - moduleState = new ThreadLocal(); - } - - public void setState(int i) { - moduleState.set(i); - } - - public boolean checkState(int i) { - return (moduleState.get() == i); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java b/branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java deleted file mode 100644 index e6bf08ccf2..0000000000 --- a/branches/sca-java-2.0-M4/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.scopes; - -public interface StateVerifier { - void setState(int i); - - boolean checkState(int i); -} diff --git a/branches/sca-java-2.0-M4/itest/scopes/src/main/resources/scopes.composite b/branches/sca-java-2.0-M4/itest/scopes/src/main/resources/scopes.composite deleted file mode 100644 index 83a71218f5..0000000000 --- a/branches/sca-java-2.0-M4/itest/scopes/src/main/resources/scopes.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java b/branches/sca-java-2.0-M4/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java deleted file mode 100644 index 594bdd5038..0000000000 --- a/branches/sca-java-2.0-M4/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.test; - -import static org.junit.Assert.fail; - -import org.apache.tuscany.sca.itest.scopes.StateVerifier; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class ScopeTestCase { - - /** - * Number of threads to drive each scope container. - */ - private static final int NUM_THREADS = 4; - - /** - * Number of iterations per thread. - */ - private static final int ITERATIONS = 200; - - private Node node; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("scopes.composite"); - node = NodeFactory.newInstance().createNode("scopes.composite", new Contribution("c1", location)); - node.start(); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testScopes() throws InterruptedException { - - Thread[] moduleScopeThreadTable = new Thread[NUM_THREADS]; - - for (int i = 0; i < NUM_THREADS; i++) { - moduleScopeThreadTable[i] = new ModuleScopeTestThread(); - } - for (int j = 0; j < NUM_THREADS; j++) { - moduleScopeThreadTable[j].start(); - } - for (int k = 0; k < NUM_THREADS; k++) { - moduleScopeThreadTable[k].join(); - } - } - - private class ModuleScopeTestThread extends Thread { - - public void run() { - StateVerifier moduleScopeService = node.getService(StateVerifier.class, "ModuleScopeComponent"); - for (int i = 1; i <= ITERATIONS; i++) { - moduleScopeService.setState(i); - if (!moduleScopeService.checkState(i)) { - fail("The module scope service lost its state on iteration " + i); - } - } - } - } - - - -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/pom.xml b/branches/sca-java-2.0-M4/itest/service-reference/pom.xml deleted file mode 100644 index 9d3afa4840..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-service-reference - Apache Tuscany SCA iTest ServiceReference - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-M4-SNAPSHOT - test - - - diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java deleted file mode 100644 index 8b5cf4d29a..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface AComponent { - String foo(); - - String fooB(); - String fooB1(); - - String fooC(); - String fooC1(); - - String fooStringD(); - String fooD(); - - String fooBC(); - - String invokeDReference(); -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java deleted file mode 100644 index 3f68ac828a..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import java.io.ByteArrayOutputStream; -import java.io.ObjectOutputStream; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(AComponent.class) -public class AComponentImpl implements AComponent { - - @Context - protected ComponentContext componentContext; - - @Reference(name = "bReference") - protected BComponent b; - - @Reference - protected CComponent cReference; - - @Reference - protected ServiceReference cServiceReference; - - @Reference(required=false) - protected DComponent dReference; - - protected DComponent dReference1; - - @Reference(name = "dReference1") - public void setDReference(DComponent dReference) { - this.dReference1 = dReference; - } - - public String foo() { - return "AComponent"; - } - - public String fooB() { - return b.foo(); - } - - public String fooB1() { - ServiceReference bRef = componentContext.cast(b); - return bRef.getService().foo(); - } - - public String fooC() { - return cReference.foo(); - } - - public String fooC1() { - return cServiceReference.getService().foo(); - } - - public String fooBC() { - ServiceReference cReference = componentContext.getServiceReference(CComponent.class, "cReference"); - return b.fooC(cReference); - } - - public String fooD() { - ServiceReference aReference = componentContext.createSelfReference(AComponent.class); - return dReference1.foo(aReference); - } - - /** - * A test case to work out what needs to be done in a transformer to get the - * CallableReference across the wire. Left here for interest in case anyone - * is looking for how to get at the innards of CallableReferences - */ - public String fooStringD() { - ServiceReference aReference = componentContext.createSelfReference(AComponent.class); - ByteArrayOutputStream bos = null; - - try { - bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(aReference); - } catch (Exception ex) { - System.out.println(ex.toString()); - return null; - } - - String aReferenceString = Base64Binary.encode(bos.toByteArray()); - return dReference1.fooString(aReferenceString); - } - - public String invokeDReference() { - return dReference.foo(null); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java deleted file mode 100644 index 18242cd594..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Remotable; - - -@Remotable -public interface BComponent { - - String foo(); - - String fooC(ServiceReference cComponent); -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java deleted file mode 100644 index dd143df036..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Service; - -@Service(BComponent.class) -public class BComponentImpl implements BComponent { - - public BComponentImpl() { - } - - public String foo() { - return "BComponent"; - } - - public String fooC(ServiceReference cReference) { - return "B" + cReference.getService().foo(); - } - -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java deleted file mode 100644 index fb436ae10c..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; - -/** - * - */ - -public final class Base64Binary { - private static final char[] S_BASE64CHAR = - {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', - 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', - 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}; - - private static final char S_BASE64PAD = '='; - - private static final byte[] S_DECODETABLE = new byte[128]; - - static { - for (int i = 0; i < S_DECODETABLE.length; i++) { - S_DECODETABLE[i] = Byte.MAX_VALUE; // 127 - } - for (int i = 0; i < S_BASE64CHAR.length; i++) { - // 0 to 63 - S_DECODETABLE[S_BASE64CHAR[i]] = (byte)i; - } - } - - private Base64Binary() { - } - - /** - * - */ - public static byte[] decode(char[] data, int off, int len) { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[len / 4 * 3 + 3]; - int obufcount = 0; - for (int i = off; i < off + len; i++) { - char ch = data[i]; - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - obufcount += decode0(ibuf, obuf, obufcount); - } - } - } - if (obufcount == obuf.length) { - return obuf; - } - byte[] ret = new byte[obufcount]; - System.arraycopy(obuf, 0, ret, 0, obufcount); - return ret; - } - - /** - * - */ - public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[3]; - for (int i = off; i < off + len; i++) { - char ch = data[i]; - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - int obufcount = decode0(ibuf, obuf, 0); - ostream.write(obuf, 0, obufcount); - } - } - } - } - - /** - * - */ - public static byte[] decode(String data) { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[data.length() / 4 * 3 + 3]; - int obufcount = 0; - for (int i = 0; i < data.length(); i++) { - char ch = data.charAt(i); - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - obufcount += decode0(ibuf, obuf, obufcount); - } - } - } - if (obufcount == obuf.length) { - return obuf; - } - byte[] ret = new byte[obufcount]; - System.arraycopy(obuf, 0, ret, 0, obufcount); - return ret; - } - - /** - * - */ - public static void decode(String data, OutputStream ostream) throws IOException { - char[] ibuf = new char[4]; - int ibufcount = 0; - byte[] obuf = new byte[3]; - for (int i = 0; i < data.length(); i++) { - char ch = data.charAt(i); - if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) { - ibuf[ibufcount++] = ch; - if (ibufcount == ibuf.length) { - ibufcount = 0; - int obufcount = decode0(ibuf, obuf, 0); - ostream.write(obuf, 0, obufcount); - } - } - } - } - - private static int decode0(char[] ibuf, byte[] obuf, int index) { - int wp = index; - int outlen = 3; - if (ibuf[3] == S_BASE64PAD) { - outlen = 2; - } - if (ibuf[2] == S_BASE64PAD) { - outlen = 1; - } - int b0 = S_DECODETABLE[ibuf[0]]; - int b1 = S_DECODETABLE[ibuf[1]]; - int b2 = S_DECODETABLE[ibuf[2]]; - int b3 = S_DECODETABLE[ibuf[3]]; - switch (outlen) { - case 1: - obuf[wp] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3); - return 1; - case 2: - obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3); - obuf[wp] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf); - return 2; - case 3: - obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3); - obuf[wp++] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf); - obuf[wp] = (byte)(b2 << 6 & 0xc0 | b3 & 0x3f); - return 3; - default: - throw new IllegalArgumentException("The character sequence is not base64 encoded."); - } - } - - /** - * Returns base64 representation of specified byte array. - */ - public static String encode(byte[] data) { - return encode(data, 0, data.length); - } - - /** - * Returns base64 representation of specified byte array. - */ - public static String encode(byte[] data, int off, int len) { - if (len <= 0) { - return ""; - } - char[] out = new char[len / 3 * 4 + 4]; - int rindex = off; - int windex = 0; - int rest = len - off; - while (rest >= 3) { - int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); - out[windex++] = S_BASE64CHAR[i >> 18]; - out[windex++] = S_BASE64CHAR[(i >> 12) & 0x3f]; - out[windex++] = S_BASE64CHAR[(i >> 6) & 0x3f]; - out[windex++] = S_BASE64CHAR[i & 0x3f]; - rindex += 3; - rest -= 3; - } - if (rest == 1) { - int i = data[rindex] & 0xff; - out[windex++] = S_BASE64CHAR[i >> 2]; - out[windex++] = S_BASE64CHAR[(i << 4) & 0x3f]; - out[windex++] = S_BASE64PAD; - out[windex++] = S_BASE64PAD; - } else if (rest == 2) { - int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); - out[windex++] = S_BASE64CHAR[i >> 10]; - out[windex++] = S_BASE64CHAR[(i >> 4) & 0x3f]; - out[windex++] = S_BASE64CHAR[(i << 2) & 0x3f]; - out[windex++] = S_BASE64PAD; - } - return new String(out, 0, windex); - } - - /** - * Outputs base64 representation of the specified byte array to a byte stream. - */ - public static void encode(byte[] data, int off, int len, OutputStream ostream) throws IOException { - if (len <= 0) { - return; - } - byte[] out = new byte[4]; - int rindex = off; - int rest = len - off; - while (rest >= 3) { - int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); - out[0] = (byte)S_BASE64CHAR[i >> 18]; - out[1] = (byte)S_BASE64CHAR[(i >> 12) & 0x3f]; - out[2] = (byte)S_BASE64CHAR[(i >> 6) & 0x3f]; - out[3] = (byte)S_BASE64CHAR[i & 0x3f]; - ostream.write(out, 0, 4); - rindex += 3; - rest -= 3; - } - if (rest == 1) { - int i = data[rindex] & 0xff; - out[0] = (byte)S_BASE64CHAR[i >> 2]; - out[1] = (byte)S_BASE64CHAR[(i << 4) & 0x3f]; - out[2] = (byte)S_BASE64PAD; - out[3] = (byte)S_BASE64PAD; - ostream.write(out, 0, 4); - } else if (rest == 2) { - int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); - out[0] = (byte)S_BASE64CHAR[i >> 10]; - out[1] = (byte)S_BASE64CHAR[(i >> 4) & 0x3f]; - out[2] = (byte)S_BASE64CHAR[(i << 2) & 0x3f]; - out[3] = (byte)S_BASE64PAD; - ostream.write(out, 0, 4); - } - } - - /** - * Outputs base64 representation of the specified byte array to a character stream. - */ - public static void encode(byte[] data, int off, int len, Writer writer) throws IOException { - if (len <= 0) { - return; - } - char[] out = new char[4]; - int rindex = off; - int rest = len - off; - int output = 0; - while (rest >= 3) { - int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff); - out[0] = S_BASE64CHAR[i >> 18]; - out[1] = S_BASE64CHAR[(i >> 12) & 0x3f]; - out[2] = S_BASE64CHAR[(i >> 6) & 0x3f]; - out[3] = S_BASE64CHAR[i & 0x3f]; - writer.write(out, 0, 4); - rindex += 3; - rest -= 3; - output += 4; - if (output % 76 == 0) { - writer.write("\n"); - } - } - if (rest == 1) { - int i = data[rindex] & 0xff; - out[0] = S_BASE64CHAR[i >> 2]; - out[1] = S_BASE64CHAR[(i << 4) & 0x3f]; - out[2] = S_BASE64PAD; - out[3] = S_BASE64PAD; - writer.write(out, 0, 4); - } else if (rest == 2) { - int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff); - out[0] = S_BASE64CHAR[i >> 10]; - out[1] = S_BASE64CHAR[(i >> 4) & 0x3f]; - out[2] = S_BASE64CHAR[(i << 2) & 0x3f]; - out[3] = S_BASE64PAD; - writer.write(out, 0, 4); - } - } -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java deleted file mode 100644 index fc15b632d2..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CComponent { - - String foo(); -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java deleted file mode 100644 index 276093b69f..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import org.oasisopen.sca.annotation.Service; - -@Service(CComponent.class) -public class CComponentImpl implements CComponent { - - public String foo() { - return "CComponent"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java deleted file mode 100644 index 84e15b5eb2..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface DComponent { - - String foo(ServiceReference aReference); - - String fooString(String aReferenceString); -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java b/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java deleted file mode 100644 index db99472385..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Service; - -@Service(DComponent.class) -public class DComponentImpl implements DComponent { - - @Context - protected RequestContext requestContext; - - public String foo(ServiceReference aReference) { - try { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(aReference); - ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); - Object obj = ois.readObject(); - aReference = (ServiceReference) obj; - } catch (Exception e) { - e.printStackTrace(); - } - System.out.println("Invoking service: " + requestContext.getServiceName()); - return "D" + aReference.getService().foo(); - } - - public String fooString(String aReferenceString) { - ServiceReference aReference = null; - try { - ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(Base64Binary.decode(aReferenceString))); - Object obj = ois.readObject(); - aReference = (ServiceReference) obj; - } catch (Exception e) { - e.printStackTrace(); - } - System.out.println("Invoking service: " + requestContext.getServiceName()); - return "D" + aReference.getService().foo(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeA/CompositeA.composite b/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeA/CompositeA.composite deleted file mode 100644 index fb88cd8bea..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeA/CompositeA.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeB/CompositeB.composite b/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeB/CompositeB.composite deleted file mode 100644 index 06e4c63e94..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/nodeB/CompositeB.composite +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite b/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite deleted file mode 100644 index 63302847b5..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java b/branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java deleted file mode 100644 index 843afe207c..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import static junit.framework.Assert.assertEquals; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.itest.serviceref.AComponent; -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; - - -/** - * Runs a distributed domain in a single VM by using and in memory - * implementation of the distributed domain - */ -public class CallableReferenceRemoteTestCase { - - private static Node nodeA; - private static Node nodeB; - - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - - try { - - System.out.println("Setting up nodes"); - - NodeFactory nodeFactory = NodeFactory.newInstance(); - - nodeA = nodeFactory.createNode("nodeA/CompositeA.composite", new Contribution("contrib","target/classes")); - nodeA.start(); - - nodeB = nodeFactory.createNode("nodeB/CompositeB.composite", new Contribution("contrib","target/classes")); - nodeB.start(); - - acomponent = nodeA.getService(AComponent.class, "AComponent/AComponent"); - - } catch (Throwable ex) { - System.out.println(ex.toString()); - // Print detailed cause information. - ex.printStackTrace(); - StringBuffer sb = new StringBuffer(); - Throwable cause = ex.getCause(); - while ( cause != null ) { - sb.append( " " ); - System.out.println( sb.toString() + "Cause: " + cause ); - if (cause instanceof java.lang.reflect.InvocationTargetException) - System.out.println( sb.toString() + "Target Exception: " + ((java.lang.reflect.InvocationTargetException)cause).getTargetException() ); - cause = cause.getCause(); - } - } - } - - @AfterClass - public static void destroy() throws Exception { - // stop the nodes and hence the domains they contain - nodeA.stop(); - nodeB.stop(); - } - - //@Test - public void testKeepServerRunning1() throws Exception { - System.out.println("press enter to continue"); - System.in.read(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testBCast() { - assertEquals("BComponent", acomponent.fooB1()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testCServiceReference() { - assertEquals("CComponent", acomponent.fooC1()); - } - - @Test - public void testDReferenceString() { - assertEquals("DAComponent", acomponent.fooStringD()); - } - - @Test - @Ignore - public void testDReference() { - assertEquals("DAComponent", acomponent.fooD()); - } - - - @Test - @Ignore - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.invokeDReference(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java b/branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java deleted file mode 100644 index 1a454c939a..0000000000 --- a/branches/sca-java-2.0-M4/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.serviceref; - -import static junit.framework.Assert.assertEquals; -import junit.framework.Assert; - -import org.apache.tuscany.sca.itest.serviceref.AComponent; -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 ServiceReferenceTestCase { - private static Node node; - private static AComponent acomponent; - - @BeforeClass - public static void init() throws Exception { - node = NodeFactory.newInstance().createNode("ServiceReferenceTest.composite", - new Contribution("contrib","src/main/resources/servicereference")); - node.start(); - acomponent = node.getService(AComponent.class, "AComponent"); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testBReference() { - assertEquals("BComponent", acomponent.fooB()); - } - - @Test - public void testBCast() { - assertEquals("BComponent", acomponent.fooB1()); - } - - @Test - public void testCReference() { - assertEquals("CComponent", acomponent.fooC()); - } - - @Test - public void testCServiceReference() { - assertEquals("CComponent", acomponent.fooC1()); - } - - @Test - public void testDReference() { - assertEquals("DAComponent", acomponent.fooD()); - } - - @Test - public void testBCReference() { - assertEquals("BCComponent", acomponent.fooBC()); - } - - @Test - public void testRequiredFalseReference() { - try { - acomponent.invokeDReference(); - } catch (Exception e) { - Assert.assertTrue(true); - } - } - -} diff --git a/branches/sca-java-2.0-M4/itest/services/pom.xml b/branches/sca-java-2.0-M4/itest/services/pom.xml deleted file mode 100644 index 9c5f5416df..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-services - Apache Tuscany SCA iTest Services - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java deleted file mode 100644 index 26e58dc530..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface AComponent { - String foo(); -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java deleted file mode 100644 index 627ff4976f..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -public class AComponentImpl implements AComponent { - - public String foo() { - return "AComponent"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java deleted file mode 100644 index d04bd1b985..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -public interface BComponent { - - String foo(); -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java deleted file mode 100644 index 01df89a8fa..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -import org.oasisopen.sca.annotation.Service; - -@Service(BComponent.class) -public class BComponentImpl implements BComponent { - - public String foo() { - return "BComponent"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java deleted file mode 100644 index 07397e4502..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CComponent { - String foo(); -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java deleted file mode 100644 index 8713e5ab22..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -public class CComponentImpl implements CComponent { - - public String foo() { - return "CComponent"; - } - -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java deleted file mode 100644 index 842a85e000..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -public interface D1Component { - String foo1(); -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java deleted file mode 100644 index 8a3923b351..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -public interface DComponent { - String foo(); -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java b/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java deleted file mode 100644 index e52692fbf4..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -import org.oasisopen.sca.annotation.Service; - -@Service({DComponent.class, D1Component.class}) -public class DComponentImpl implements DComponent, D1Component { - - public String foo() { - return "DComponent"; - } - - public String foo1() { - return "DComponent"; - } -} diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-2.0-M4/itest/services/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e21261d8d0..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/services/src/main/resources/ServicesTest.composite b/branches/sca-java-2.0-M4/itest/services/src/main/resources/ServicesTest.composite deleted file mode 100644 index e7d56032ea..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/main/resources/ServicesTest.composite +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/branches/sca-java-2.0-M4/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java b/branches/sca-java-2.0-M4/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java deleted file mode 100644 index da779b2c54..0000000000 --- a/branches/sca-java-2.0-M4/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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.services; - -import static org.junit.Assert.assertEquals; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.ServiceRuntimeException; - -public class ServicesTestCase { - private static Node node; - - @BeforeClass - public static void init() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("ServicesTest.composite"); - node = NodeFactory.newInstance().createNode("ServicesTest.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void destroy() throws Exception { - node.stop(); - } - - @Test - public void testAService() { - AComponent a1 = node.getService(AComponent.class, "AComponent1"); - assertEquals("AComponent", a1.foo()); - - AComponent a2 = node.getService(AComponent.class, "AComponent2/AComponent"); - assertEquals("AComponent", a2.foo()); - } - - @Test - public void testBService() { - BComponent a1 = node.getService(BComponent.class, "BComponent1"); - assertEquals("BComponent", a1.foo()); - - BComponent a2 = node.getService(BComponent.class, "BComponent2/BComponent"); - assertEquals("BComponent", a2.foo()); - } - - @Test - public void testCService() { - CComponent a1 = node.getService(CComponent.class, "CComponent1"); - assertEquals("CComponent", a1.foo()); - - CComponent a2 = node.getService(CComponent.class, "CComponent2/CComponent"); - assertEquals("CComponent", a2.foo()); - } - - @Test - public void testDService() { - DComponent a1 = node.getService(DComponent.class, "DComponent1/DComponent"); - assertEquals("DComponent", a1.foo()); - - D1Component a2 = node.getService(D1Component.class, "DComponent1/D1Component"); - assertEquals("DComponent", a2.foo1()); - - try { - node.getService(DComponent.class, "DComponent1"); - Assert.fail("The service name is required"); - } catch (ServiceRuntimeException e) { - Assert.assertTrue("The service name is required", true); - } - - DComponent a3 = node.getService(DComponent.class, "DComponent2/DComponent"); - assertEquals("DComponent", a3.foo()); - - D1Component a4 = node.getService(D1Component.class, "DComponent2/D1Component"); - assertEquals("DComponent", a4.foo1()); - - } - - public static void main(String[] args) throws Exception { - ServicesTestCase.init(); - ServicesTestCase tester = new ServicesTestCase(); - tester.testAService(); - tester.testBService(); - tester.testCService(); - tester.testDService(); - ServicesTestCase.destroy(); - } -} diff --git a/branches/sca-java-2.0-M4/itest/wires/pom.xml b/branches/sca-java-2.0-M4/itest/wires/pom.xml deleted file mode 100644 index 5ad88d2e84..0000000000 --- a/branches/sca-java-2.0-M4/itest/wires/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M4-SNAPSHOT - ../pom.xml - - itest-wires - Apache Tuscany SCA iTest Wires Basic - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M4-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M4-SNAPSHOT - test - - - - diff --git a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java b/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java deleted file mode 100644 index f5a4337254..0000000000 --- a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * This is the client interface for the wires tests - */ -@Remotable -public interface WireClient { - - /** - * This tests the wires. - */ - void runTests(); -} diff --git a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java b/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java deleted file mode 100644 index 82f0e26d58..0000000000 --- a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.junit.Assert; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * This is the client implementation for the wires tests - */ -@Service(WireClient.class) -public class WireClientImpl implements WireClient { - /** - * This is our injected reference to the WireService - */ - @Reference - protected WireService aWireService; - - /** - * This tests the wire reference - */ - public void runTests() { - // Make sure the wire has injected a reference - Assert.assertNotNull(aWireService); - - // Test the injected reference - String msg = aWireService.sayHello("MCC"); - - // Validate the response - Assert.assertNotNull(msg); - Assert.assertEquals("Hello MCC", msg); - } -} diff --git a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java b/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java deleted file mode 100644 index 67df1e3a52..0000000000 --- a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * Sample Wire Service - */ -@Remotable -public interface WireService { - /** - * Returns "Hello " + aName - * - * @param aName The name to say hello - * @return "Hello " + aName - */ - String sayHello(String aName); -} diff --git a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java b/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java deleted file mode 100644 index f0308252ba..0000000000 --- a/branches/sca-java-2.0-M4/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.oasisopen.sca.annotation.Service; - -/** - * Sample WireService Implementation - */ -@Service(WireService.class) -public class WireServiceImpl implements WireService { - - /** - * Returns "Hello " + aName - * - * @param aName The name to say hello - * @return "Hello " + aName - */ - public String sayHello(String aName) { - return "Hello " + aName; - } -} diff --git a/branches/sca-java-2.0-M4/itest/wires/src/main/resources/WireTest.composite b/branches/sca-java-2.0-M4/itest/wires/src/main/resources/WireTest.composite deleted file mode 100644 index 614beaec00..0000000000 --- a/branches/sca-java-2.0-M4/itest/wires/src/main/resources/WireTest.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-2.0-M4/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java b/branches/sca-java-2.0-M4/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java deleted file mode 100644 index 2a0095cabc..0000000000 --- a/branches/sca-java-2.0-M4/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT 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; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -/** - * This test case will attempt to use a wire - */ -public class WireTestCase { - - /** - * The Node we are using - */ - private Node node; - - /** - * The client the tests should use - */ - private WireClient aWireClient; - - /** - * Run the wire tests - */ - @Test - public void testWire() { - aWireClient.runTests(); - } - - /** - * Load the Wire composite and look up the client. - */ - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("WireTest.composite"); - node = NodeFactory.newInstance().createNode("WireTest.composite", new Contribution("c1", location)); - node.start(); - aWireClient = node.getService(WireClient.class, "WireClient"); - Assert.assertNotNull(aWireClient); - - aWireClient = node.getService(WireClient.class, "AnotherWireClient"); - Assert.assertNotNull(aWireClient); - } - - /** - * Shutdown the SCA node - */ - - @After - public void tearDown() throws Exception { - node.stop(); - } -} -- cgit v1.2.3