From d1a96a1d9f189ec86d51fc9e4a315879b35be1d0 Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 31 Jul 2009 10:49:22 +0000 Subject: Rename 2.0 M3 final RC tag git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799570 13f79535-47bb-0310-9956-ffa450edef68 --- tags/java/sca/2.0-M3-RC5/itest/builder/pom.xml | 112 --- .../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 | 24 - .../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 | 875 --------------------- .../sca/itest/builder/CustomCompositeBuilder.java | 101 --- .../tuscany/sca/itest/builder/TestUtils.java | 276 ------- .../java/sca/2.0-M3-RC5/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 -- .../sca/2.0-M3-RC5/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/2.0-M3-RC5/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 -- .../2.0-M3-RC5/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 -- tags/java/sca/2.0-M3-RC5/itest/callback-id/pom.xml | 53 -- .../tuscany/sca/test/CallBackIdCallBack.java | 31 - .../apache/tuscany/sca/test/CallBackIdClient.java | 28 - .../tuscany/sca/test/CallBackIdClientImpl.java | 145 ---- .../apache/tuscany/sca/test/CallBackIdService.java | 33 - .../tuscany/sca/test/CallBackIdServiceImpl.java | 47 -- .../src/main/resources/CallBackIdClient.composite | 33 - .../tuscany/sca/test/CallBackIdTestCase.java | 51 -- .../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 | 47 -- .../sca/itest/EventProcessorServiceImpl.java | 195 ----- .../resources/CallBackSeparateThreadTest.composite | 31 - .../sca/itest/CallBackSeparateThreadTestCase.java | 73 -- .../2.0-M3-RC5/itest/callback-set-callback/pom.xml | 53 -- .../sca/test/CallBackSetCalbackService.java | 34 - .../sca/test/CallBackSetCallbackBadCallback.java | 37 - .../sca/test/CallBackSetCallbackCallback.java | 31 - .../sca/test/CallBackSetCallbackCallbackImpl.java | 66 -- .../sca/test/CallBackSetCallbackClient.java | 28 - .../sca/test/CallBackSetCallbackClientImpl.java | 188 ----- .../test/CallBackSetCallbackObjectCallback.java | 44 -- .../sca/test/CallBackSetCallbackServiceImpl.java | 73 -- .../resources/CallBackSetCallbackTest.composite | 37 - .../sca/test/CallBackSetCallbackTestCase.java | 54 -- .../itest/callback-set-conversation/pom.xml | 53 -- .../test/CallBackSetCallbackConvBadCallback.java | 39 - .../sca/test/CallBackSetCallbackConvCallback.java | 34 - .../sca/test/CallBackSetCallbackConvClient.java | 28 - .../test/CallBackSetCallbackConvClientImpl.java | 157 ---- .../CallBackSetCallbackConvNonSerCallback.java | 56 -- .../CallBackSetCallbackConvObjectCallback.java | 51 -- .../sca/test/CallBackSetCallbackConvService.java | 36 - .../test/CallBackSetCallbackConvServiceImpl.java | 98 --- .../CallBackSetCallbackConvTest.composite | 33 - .../sca/test/CallBackSetCallbackConvTestCase.java | 52 -- .../sca/2.0-M3-RC5/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 -- .../2.0-M3-RC5/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 .../sca/2.0-M3-RC5/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 .../sca/2.0-M3-RC5/itest/conversations/pom.xml | 53 -- .../java/org/apache/tuscany/sca/itest/Record.java | 29 - .../org/apache/tuscany/sca/itest/TestResult.java | 37 - .../tuscany/sca/itest/conversational/AService.java | 56 -- .../tuscany/sca/itest/conversational/Alpha.java | 32 - .../tuscany/sca/itest/conversational/BService.java | 42 - .../tuscany/sca/itest/conversational/Beta.java | 31 - .../tuscany/sca/itest/conversational/CService.java | 42 - .../sca/itest/conversational/Constants.java | 25 - .../conversational/ConversationIdService.java | 30 - .../conversational/ConversationalCallback.java | 49 -- .../itest/conversational/ConversationalClient.java | 66 -- .../ConversationalReferenceClient.java | 36 - .../conversational/ConversationalService.java | 61 -- ...ersationalServiceNonConversationalCallback.java | 61 -- .../tuscany/sca/itest/conversational/DService.java | 46 -- .../tuscany/sca/itest/conversational/Gamma.java | 41 - .../conversational/NonConversationalCallback.java | 45 -- .../itest/conversational/impl/AServiceImpl.java | 108 --- .../sca/itest/conversational/impl/AlphaImpl.java | 69 -- .../itest/conversational/impl/BServiceImpl.java | 72 -- .../sca/itest/conversational/impl/BetaImpl.java | 50 -- .../itest/conversational/impl/CServiceImpl.java | 84 -- .../impl/ConversationAgeComponentImpl.java | 75 -- .../impl/ConversationIdComponentImpl.java | 48 -- .../impl/ConversationMaxIdleComponentImpl.java | 75 -- .../impl/ConversationalClientStatefulImpl.java | 325 -------- ...lientStatefulNonConversationalCallbackImpl.java | 318 -------- .../impl/ConversationalClientStatelessImpl.java | 322 -------- .../impl/ConversationalReferenceClientImpl.java | 42 - .../impl/ConversationalServiceRequestImpl.java | 122 --- .../impl/ConversationalServiceStatefulImpl.java | 114 --- ...rviceStatefulNonConversationalCallbackImpl.java | 115 --- .../impl/ConversationalServiceStatelessImpl.java | 122 --- .../ConversationalServiceStatelessScopeImpl.java | 93 --- .../itest/conversational/impl/DServiceImpl.java | 68 -- .../sca/itest/conversational/impl/GammaImpl.java | 66 -- .../src/main/resources/ConversationAge.composite | 31 - .../main/resources/ConversationUniqueId.composite | 53 -- .../src/main/resources/conversationId.composite | 27 - .../main/resources/conversationLifetime.composite | 33 - .../src/main/resources/conversational.composite | 99 --- .../conversational/ConversationIdTestCase.java | 56 -- .../ConversationLifetimeTestCase.java | 208 ----- .../ConversationUniqueIdTestCase.java | 78 -- .../conversational/ConversationalAgeTestCase.java | 107 --- .../conversational/ConversationalJ2SETestCase.java | 88 --- .../conversational/ConversationalTestCase.java | 702 ----------------- .../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 ---- .../java/sca/2.0-M3-RC5/itest/distribution/pom.xml | 50 -- .../distribution/webapp-helloworld-bpel/pom.xml | 124 --- .../src/test/java/itest/HelloworldTestCase.java | 50 -- .../distribution/webapp-helloworld-jsp/pom.xml | 124 --- .../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 --- tags/java/sca/2.0-M3-RC5/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 -- .../2.0-M3-RC5/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 --- .../main/resources/CalculatorService-context.xml | 39 - .../sca/SpringDelegationHelloWorld-context.xml | 39 - .../META-INF/sca/SpringHelloWorld-context.xml | 31 - .../context-access/CalculatorService-context.xml | 45 -- .../context-imports/CalculatorService-context.xml | 39 - .../sca/context-imports/SpringImport-context.xml | 29 - .../context-multiple/SpringHelloWorld-context.xml | 31 - .../context-multiple/StockQuoteService-context.xml | 36 - .../sca/context-multiple/beanRefContext.xml | 35 - .../CalculatorService-context.xml | 39 - .../sca/location-folder/META-INF/MANIFEST.MF | 3 - .../META-INF/spring/SpringSCAProperty-context.xml | 34 - .../META-INF/sca/location-jar/spring-context.jar | Bin 1454 -> 0 bytes .../SpringExplicitReference-context.xml | 33 - .../SpringImplicitReference-context.xml | 34 - .../sca-services/SpringExplicitService-context.xml | 39 - .../sca-services/SpringImplicitService-context.xml | 31 - .../CalculatorService-context.xml | 41 - .../context/access/ContextAccess.composite | 49 -- .../context/imports/ContextImports.composite | 49 -- .../context/multiple/MultipleContext.composite | 35 - .../implementation/policies/CalculatorJass.config | 3 - .../policies/CalculatorLogMessages.properties | 18 - .../policies/ImplementationPolicies.composite | 58 -- .../implementation/policies/definitions.xml | 40 - .../location/folder/SpringFolderLocation.composite | 39 - .../location/jar/SpringJarLocation.composite | 39 - .../spring/SpringDelegationHelloWorld.composite | 32 - .../sca/itest/spring/SpringHelloWorld.composite | 32 - .../references/SpringExplicitReference.composite | 32 - .../references/SpringImplicitReference.composite | 39 - .../sca/services/SpringExplicitService.composite | 33 - .../sca/services/SpringImplicitService.composite | 32 - .../spring/annotations/Calculator.composite | 60 -- .../test/java/context/access/CalculatorClient.java | 59 -- .../java/context/access/ContextAccessTestCase.java | 32 - .../java/context/imports/CalculatorClient.java | 51 -- .../context/imports/ContextImportsTestCase.java | 32 - .../context/multiple/MultipleContextTestCase.java | 32 - .../java/context/multiple/StockQuoteServer.java | 53 -- .../implementation/policies/CalculatorClient.java | 74 -- .../policies/ImplementationPoliciesTestCase.java | 35 - .../folder/SpringFolderLocationTestCase.java | 41 - .../location/jar/SpringJarLocationTestCase.java | 41 - .../itest/spring/AbstractHelloWorldTestCase.java | 40 - .../sca/itest/spring/AbstractSCATestCase.java | 57 -- .../tuscany/sca/itest/spring/HelloWorld.java | 34 - .../tuscany/sca/itest/spring/HelloWorldProxy.java | 41 - .../spring/SpringDelegationHelloWorldTestCase.java | 31 - .../sca/itest/spring/SpringHelloWorldTestCase.java | 32 - .../sca/itest/spring/TestHelloWorldBean.java | 36 - .../itest/spring/TestHelloWorldDelegatorBean.java | 40 - .../SpringExplicitReferenceTestCase.java | 41 - .../SpringImplicitReferenceTestCase.java | 44 -- .../services/SpringExplicitServiceTestCase.java | 36 - .../services/SpringImplicitServiceTestCase.java | 34 - .../java/spring/annotations/CalculatorClient.java | 61 -- .../annotations/SpringAnnotationsTestCase.java | 32 - tags/java/sca/2.0-M3-RC5/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 - .../sca/itest/interfaces/InterfacesTestCase.java | 131 --- .../itest/nodes/helloworld-client/pom.xml | 44 -- .../src/main/java/itest/nodes/HelloworldImpl.java | 33 - .../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 | 26 - .../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 - .../2.0-M3-RC5/itest/nodes/one-node-test/pom.xml | 48 -- .../src/test/java/itest/OneNodeTestCase.java | 87 -- tags/java/sca/2.0-M3-RC5/itest/nodes/pom.xml | 44 -- .../2.0-M3-RC5/itest/nodes/two-nodes-test/pom.xml | 53 -- .../src/test/java/itest/TwoNodesTestCase.java | 101 --- .../2.0-M3-RC5/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 --- tags/java/sca/2.0-M3-RC5/itest/pom.xml | 166 ---- tags/java/sca/2.0-M3-RC5/itest/properties/pom.xml | 106 --- .../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 | 135 ---- .../tuscany/sca/itest/PropertyComponentImpl.java | 188 ----- .../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 | 255 ------ .../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 | 469 ----------- .../cdi/ConstructorPropertyInjectionTestCase.java | 72 -- .../2.0-M3-RC5/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 --- tags/java/sca/2.0-M3-RC5/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 | 60 -- .../references/AutoWiredReferenceTestCase.java | 114 --- .../itest/references/InnerReferenceTestCase.java | 99 --- .../references/ManualWiredReferenceTestCase.java | 98 --- .../sca/2.0-M3-RC5/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 | 60 -- tags/java/sca/2.0-M3-RC5/itest/scopes/pom.xml | 54 -- .../scopes/CompositeScopeStateVerifierImpl.java | 46 -- .../scopes/RequestScopeStateVerifierImpl.java | 51 -- .../tuscany/sca/itest/scopes/StateVerifier.java | 25 - .../scopes/src/main/resources/scopes.composite | 33 - .../org/apache/tuscany/sca/test/ScopeTestCase.java | 113 --- tags/java/sca/2.0-M3-RC5/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 | 22 - .../src/main/resources/ServicesTest.composite | 70 -- .../sca/itest/services/ServicesTestCase.java | 108 --- tags/java/sca/2.0-M3-RC5/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 -- 462 files changed, 27544 deletions(-) delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/service3.wsdl delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/service3.wsdl delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenarios.wsdl delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenarios.wsdl delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenarios.wsdl delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenarios.wsdl delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9a.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/resources/CallBackApiTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/resources/CallBackBasicTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/resources/CallBackIdClient.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/AddService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/AddServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/DivideService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/MultiplyService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/SubtractService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/Calculator.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/component-type/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/java/calculator/CalculatorService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository3/contribution.zip delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-zip/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/java/calculator/CalculatorService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/resources/repository/contribution.zip delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/Record.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/TestResult.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/AService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Alpha.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/BService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Beta.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/CService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Constants.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationIdService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalServiceNonConversationalCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/DService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Gamma.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallback.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AlphaImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BetaImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/CServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulNonConversationalCallbackImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceRequestImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulNonConversationalCallbackImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScopeImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/DServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/GammaImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationAge.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationUniqueId.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationId.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationLifetime.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversational.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationLifetimeTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationUniqueIdTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/build.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/build.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/build.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/build.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/legal-checks/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-bpel/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-jsp/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-stripes/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/resources/ExceptionTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/AddService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/CalculatorService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/DivideService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/MultiplyService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/SubtractService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestBean.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestReference.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/CalculatorService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-access/CalculatorService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/CalculatorService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/SpringImport-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/StockQuoteService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/MANIFEST.MF delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/spring/SpringSCAProperty-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/spring-annotation/CalculatorService-context.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/resources/InterfacesTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/one-node-test/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/operation-overloading/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/resources/OperationOverload.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/package-info.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/ConstructorPropertyInjection.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/Outer.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/OuterPropertyTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/PropertyTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/customer.xsd delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/fileProperty.txt delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/manyValuesFileProperty.txt delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/mySimpleService.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcProps.txt delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcprops.xsd delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/AutoWiredReferencesTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/InnerReferencesTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/ManualWiredReferencesTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scaclient-api/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/java/itest/HelloworldService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/resources/Helloworld.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scopes/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/RequestScopeStateVerifierImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/resources/scopes.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/ServicesTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/wires/pom.xml delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/wires/src/main/resources/WireTest.composite delete mode 100644 tags/java/sca/2.0-M3-RC5/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java (limited to 'tags/java/sca/2.0-M3-RC5/itest') diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/pom.xml deleted file mode 100644 index aa2f7c299a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-builder - Apache Tuscany SCA iTest Builder - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - runtime - - - - org.apache.tuscany.sca - tuscany-monitor - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-binding-sca-runtime - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-assembly - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-core-databinding - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - xerces - xercesImpl - 2.8.1 - test - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java deleted file mode 100644 index a4c6e08844..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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(interfaces={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/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java deleted file mode 100644 index bfc4e34644..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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(interfaces={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/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java deleted file mode 100644 index eb5b5dd5c0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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(interfaces={Service3.class}) -public class ComponentEImpl implements Service3 { - - - public String getGreetings(String name) { - return "Hello, " + name + " from ComponentE"; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java deleted file mode 100644 index db1eac6787..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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(interfaces={Service3.class}) -public class ComponentFImpl implements Service3 { - - - public String getGreetings(String name) { - return "Hello, " + name + " from ComponentF"; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java deleted file mode 100644 index f4b8d2cf39..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java deleted file mode 100644 index 299f7606e3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml deleted file mode 100644 index d8cb23bbd3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1.composite deleted file mode 100644 index 4e58cdfa16..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1a.composite deleted file mode 100644 index 06b273c7a7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario1/scenario1a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml deleted file mode 100644 index ac01b3c687..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10.composite deleted file mode 100644 index 2d127a7bec..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10.composite +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10a.composite deleted file mode 100644 index 98103e360e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/scenario10a.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/service3.wsdl b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/service3.wsdl deleted file mode 100644 index 2477e23dc6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario10/service3.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml deleted file mode 100644 index 8b82b43c68..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11.composite deleted file mode 100644 index 2f5ca96d07..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11.composite +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11a.composite deleted file mode 100644 index 381ccddcc3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/scenario11a.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/service3.wsdl b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/service3.wsdl deleted file mode 100644 index 2477e23dc6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario11/service3.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml deleted file mode 100644 index 4028098023..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12.composite deleted file mode 100644 index 23799f8487..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12a.composite deleted file mode 100644 index a2b4f88dc3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario12/scenario12a.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml deleted file mode 100644 index 1da59d5f04..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13.composite deleted file mode 100644 index 631e38855f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13a.composite deleted file mode 100644 index 98976dc4e8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario13/scenario13a.composite +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml deleted file mode 100644 index 6f174a4504..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2.composite deleted file mode 100644 index 7c4eeda4bd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2a.composite deleted file mode 100644 index 5e97d7eea0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario2/scenario2a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml deleted file mode 100644 index 22950dfe03..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3.composite deleted file mode 100644 index 84f42c60fc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3a.composite deleted file mode 100644 index 18ed91142c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario3/scenario3a.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml deleted file mode 100644 index a17e27c9d8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4.composite deleted file mode 100644 index a0bdb0197d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4a.composite deleted file mode 100644 index 1b4cf27c76..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario4/scenario4a.composite +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml deleted file mode 100644 index 83a232db6e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5.composite deleted file mode 100644 index 2326afd2f2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5.composite +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5a.composite deleted file mode 100644 index fdf1423b66..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenario5a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenarios.wsdl b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario5/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml deleted file mode 100644 index 776dfe4d97..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6.composite deleted file mode 100644 index 9575612d51..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6a.composite deleted file mode 100644 index 9c7b58e2cb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenario6a.composite +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenarios.wsdl b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario6/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml deleted file mode 100644 index ede31d6bee..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7.composite deleted file mode 100644 index e1d2e0cefe..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7.composite +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7a.composite deleted file mode 100644 index ef16dc0785..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenario7a.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenarios.wsdl b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario7/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml deleted file mode 100644 index 7bb9e694a3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8.composite deleted file mode 100644 index 467b7f57fa..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8.composite +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8a.composite deleted file mode 100644 index 9d9b5ba945..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenario8a.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenarios.wsdl b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenarios.wsdl deleted file mode 100644 index 5cda7327dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario8/scenarios.wsdl +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml deleted file mode 100644 index b6ec160506..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9.composite deleted file mode 100644 index 83584ed482..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9a.composite b/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9a.composite deleted file mode 100644 index 0021ec242b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/main/resources/scenario9/scenario9a.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java deleted file mode 100644 index cdeb355f8b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java +++ /dev/null @@ -1,875 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.ComponentReference; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; -import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -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 { - } - - // 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 - 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(); - - // 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(); - javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service")); - Port port = svc.getPort("Service3Port"); - assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port)); - - Component componentD = TestUtils.getComponent(domainComposite, "ComponentD"); - 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 $promoted$Service1 - // and $promoted$ComponentB$slash$Service2 - for (ComponentService service : componentD.getServices()) { - if (!"$promoted$Service1".equals(service.getName()) && - !"$promoted$ComponentB$slash$Service2".equals(service.getName())) { - assert service.getBinding(WebServiceBinding.class) == null; - } - } - - // No services on CompositeC should have , except for Service2 in Scenario 3 - Composite compositeC = TestUtils.getComposite(domainComposite, new QName(namespace, "CompositeC")); - for (Service service : compositeC.getServices()) { - if ("http://scenario3".equals(namespace) && "Service2".equals(service.getName())) { - assert service.getBinding(WebServiceBinding.class) != null; - } else { - assert service.getBinding(WebServiceBinding.class) == null; - } - } - } - - // 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 - @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/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java deleted file mode 100644 index da8a46067a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.core.assembly.CompositeActivator; -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.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.apache.tuscany.sca.node.impl.NodeImpl; - - -public class CustomCompositeBuilder { - - private boolean nonWiring; - private Node node; - private ExtensionPointRegistry extensionPoints; - private Monitor monitor; - private StAXArtifactProcessor compositeProcessor; - private Composite domainComposite; - - public CustomCompositeBuilder(boolean nonWiring) { - this.nonWiring = nonWiring; - } - - public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception { - node = NodeFactory.newInstance().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); - domainComposite = compositeActivator.getDomainComposite(); - } - - /** - * 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) domainComposite.getIncludes().get(0); - } - - /** - * Returns the monitor. - * @return the monitor instance - */ - public Monitor getMonitor() { - return monitor; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java b/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java deleted file mode 100644 index f4d8b094c7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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 junit.framework.TestCase; -import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.ComponentReference; -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.binding.ws.WebServiceBinding; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.monitor.Monitor; -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(); - } - problems = true; - } - assert !problems; - } - - protected static String getPortAddress(Port port) { - Object ext = port.getExtensibilityElements().get(0); - if (ext instanceof SOAPAddress) { - return ((SOAPAddress)ext).getLocationURI(); - } - if (ext instanceof SOAP12Address) { - return ((SOAP12Address)ext).getLocationURI(); - } - return null; - } - - 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); - - // 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 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/tags/java/sca/2.0-M3-RC5/itest/callback-api/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-api/pom.xml deleted file mode 100644 index 6ec7074d6a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-api/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-api - Apache Tuscany SCA iTest Callback API - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - - - ${basedir}/../build-was-integration.xml - ${basedir}/../wasAdmin.py - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java deleted file mode 100644 index b013462f9f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java deleted file mode 100644 index 252e4dc45f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java deleted file mode 100644 index d883dc2d6f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java deleted file mode 100644 index afb7c45e2c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java deleted file mode 100644 index bdac56d222..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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.CallableReference; -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.RequestContext; -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 CallableReference 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/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/resources/CallBackApiTest.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/resources/CallBackApiTest.composite deleted file mode 100644 index 309311e258..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/resources/CallBackApiTest.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 6e049d603e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java deleted file mode 100644 index 75fab95efb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/pom.xml deleted file mode 100644 index 15b5795a20..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-basic-ws - Apache Tuscany SCA iTest Callback Basic WebServices - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-host-http - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-M3 - test - - - - - ${basedir}/../build-was-integration.xml - ${basedir}/../wasAdmin.py - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java deleted file mode 100644 index 291a72b9d6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java deleted file mode 100644 index 19f366c423..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java deleted file mode 100644 index 4bb6b29a8d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java deleted file mode 100644 index 5396879e83..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java deleted file mode 100644 index 07010f61e1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite deleted file mode 100644 index db1a2fbf6a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/resources/CallBackBasicTest.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b58fabcd79..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic-ws/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java deleted file mode 100644 index 43b812faed..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/pom.xml deleted file mode 100644 index 529c79089d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-basic/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-basic - Apache Tuscany SCA iTest Callback Basic - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - - - ${basedir}/../build-was-integration.xml - ${basedir}/../wasAdmin.py - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java deleted file mode 100644 index 291a72b9d6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java deleted file mode 100644 index 19f366c423..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java deleted file mode 100644 index 4bb6b29a8d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java deleted file mode 100644 index 5396879e83..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java deleted file mode 100644 index 07010f61e1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/resources/CallBackBasicTest.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/resources/CallBackBasicTest.composite deleted file mode 100644 index 87cde940e1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/resources/CallBackBasicTest.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b58fabcd79..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java deleted file mode 100644 index 43b812faed..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/pom.xml deleted file mode 100644 index 66f2b7d9ec..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-complex-type - Apache Tuscany SCA iTest Callback Complex Type - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java deleted file mode 100644 index 627d37e27d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java deleted file mode 100644 index 966ad17b9a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java deleted file mode 100644 index d2dc0add75..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java deleted file mode 100644 index 32ab1bdd3e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java deleted file mode 100644 index f7a1a195ed..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite deleted file mode 100644 index 2eea567fff..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType deleted file mode 100644 index af0b373472..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java deleted file mode 100644 index dde489d766..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-id/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-id/pom.xml deleted file mode 100644 index 9907a1beb5..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-id - Apache Tuscany SCA iTest Callback ID - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java b/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java deleted file mode 100644 index 643cb3beb8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.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.test; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -/** - * - */ -public interface CallBackIdCallBack { - - void callBackMessage(String aString); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java deleted file mode 100644 index 6e5a0c7654..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.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 CallBackIdClient { - - void run(); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java deleted file mode 100644 index aaf99a534b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.ComponentContext; -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackIdClient.class) -public class CallBackIdClientImpl implements CallBackIdClient, CallBackIdCallBack { - - @Context - protected ComponentContext componentContext; - - @Reference - protected ServiceReference aCallBackService; - - private static String returnMessage = null; - private static Object monitor = new Object(); - private static Object callBackId; - - public void run() { - - // This tests the use of the set/get callbackId API both SCA generated - // and client specified. - - // Test1 uses a SCA generated callback ID and compare that with the - // callbackID returned during callback. - test11a(); - - // Test2 uses a Client specified callback ID and compare that with the - // callbackID returned during callback. - test11b(); - - } - - private void test11a() { - - // Retrieve this services callback ID and save it. Once the callback is - // received the callback ID will be compared with the one - // returned. Equal is good. - - Object origCallBackId = aCallBackService.getCallbackID(); - aCallBackService.getService().knockKnock("Knock Knock - Test1"); - int count = 0; - - // - // If we cannot 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("CallBackIdITest - test11a - SCA Generated Id", origCallBackId, this.getCallBackId()); - - } - - private void test11b() { - - // Set the services callback ID and save it. Once the callback is - // received the callback ID will be compared with the one - // returned. Equal is good. - - String origCallBackId = "CallBackId1"; - aCallBackService.setCallbackID(origCallBackId); - - aCallBackService.getService().knockKnock("Knock Knock - Test2"); - 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("CallBackIdITest - 11b - Client Specified Id", origCallBackId, (String)this.getCallBackId()); - - } - - public String getReturnMessage() { - return returnMessage; - } - - public void setReturnMessage(String aReturnMessage) { - returnMessage = aReturnMessage; - } - - public void callBackMessage(String aString) { - - System.out.println("Entering callback callBackMessage: " + aString); - RequestContext rc = componentContext.getRequestContext(); - Object callBackId = rc.getServiceReference().getCallbackID(); - - synchronized (monitor) { - this.setReturnMessage(aString); - this.setCallBackId(callBackId); - monitor.notify(); - } - } - - protected Object getCallBackId() { - return callBackId; - } - - protected void setCallBackId(Object aCallBackId) { - callBackId = aCallBackId; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java deleted file mode 100644 index cc7907f6ae..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.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.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBackIdCallBack.class) -/** - * - */ -public interface CallBackIdService { - - void knockKnock(String aString); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java deleted file mode 100644 index 4f04959b9d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.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.test; - -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.RequestContext; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackIdService.class) -public class CallBackIdServiceImpl implements CallBackIdService { - - @Callback - protected CallBackIdCallBack callback; - @Context - protected ComponentContext compositeContext; - - public void knockKnock(String aString) { - - System.out.println("CallBackIdServiceImpl message received: " + aString); - RequestContext rc = compositeContext.getRequestContext(); - Object callBackId = rc.getServiceReference().getCallbackID(); - System.out.println("CallBackIdServiceImpl callbackID: " + callBackId); - - callback.callBackMessage("Who's There"); - System.out.println("CallBackIdServiceImpl response sent"); - - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/resources/CallBackIdClient.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/resources/CallBackIdClient.composite deleted file mode 100644 index a2b69afe69..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/main/resources/CallBackIdClient.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java deleted file mode 100644 index 56fd46d1b0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.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.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 CallBackIdTestCase { - - private Node node; - private CallBackIdClient aCallBackClient; - - @Test - public void testCallBackBasic() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallBackIdClient.composite"); - node = NodeFactory.newInstance().createNode("CallBackIdClient.composite", new Contribution("c1", location)); - node.start(); - aCallBackClient = node.getService(CallBackIdClient.class, "CallBackIdClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/pom.xml deleted file mode 100644 index f17263214f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-multiple-wires - Apache Tuscany SCA iTest Callback With Mutiple Wires - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java deleted file mode 100644 index 7c80d222fc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java deleted file mode 100644 index c3ea6c3032..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java deleted file mode 100644 index 84ca158c97..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java deleted file mode 100644 index 66758a1e73..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java deleted file mode 100644 index f198efae51..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java deleted file mode 100644 index 49df5aa17a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite deleted file mode 100644 index ddf25b2578..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java deleted file mode 100644 index bd3cce74b4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/pom.xml deleted file mode 100644 index bef92719d2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-separatethread - Apache Tuscany SCA iTest Callback Using Separate Thread - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java deleted file mode 100644 index dc66003604..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java deleted file mode 100644 index f03144db8a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java deleted file mode 100644 index 137ea6a658..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java deleted file mode 100644 index a00578427c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.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; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Conversational; -import org.oasisopen.sca.annotation.Remotable; - -/** - * Sample Event Processor Service - */ -@Conversational -@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/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java deleted file mode 100644 index 692ffbe8dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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.CallableReference; -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("CONVERSATION") -public class EventProcessorServiceImpl implements EventProcessorService { - - /** - * Reference to the call back - */ - @Callback - protected CallableReference 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 CallableReference 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/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite deleted file mode 100644 index a6e2c35761..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java deleted file mode 100644 index c216cab1be..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/pom.xml deleted file mode 100644 index 5c552f1d81..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-set-callback - Apache Tuscany SCA iTest Set Callback - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java deleted file mode 100644 index e54b9b4004..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.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.test; - -import org.oasisopen.sca.annotation.Callback; - -// @Remotable -@Callback(CallBackSetCallbackCallback.class) -/** - * - */ -public interface CallBackSetCalbackService { - - void knockKnock(String aString); - - boolean setCallbackIllegally(String aString); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java deleted file mode 100644 index f80401836e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.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.junit.Assert; - -public class CallBackSetCallbackBadCallback { - - public CallBackSetCallbackBadCallback() { - super(); - } - - public void callback(String aString) { - // - // This callback method should never be called. - // - System.out.println("CallBackSetCallbackBadCallback: callback called"); - Assert.fail("CallBackSetCallbackBadCallback: callback called"); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java deleted file mode 100644 index a15bcd90ae..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.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.test; - -// @Remotable -/** - * - */ -public interface CallBackSetCallbackCallback { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java deleted file mode 100644 index 3e72b7ef3c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.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 org.apache.tuscany.sca.test; - -import java.io.File; - -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackSetCallbackCallback.class) -public class CallBackSetCallbackCallbackImpl implements CallBackSetCallbackCallback { - - private static String returnMessage = null; - private static int callBackCount = 0; - - 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 CallBackSetCallbackCallbackImpl callBackMessage: " + aString); - - File aFile = new File("target/test4_marker"); - try { - aFile.createNewFile(); - } catch (Exception ex) { - System.out.println("Error Creating target/test4_marker marker file"); - ex.printStackTrace(); - } - - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - this.incrementCallBackCount(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java deleted file mode 100644 index 6fd13eec5f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.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 CallBackSetCallbackClient { - - void run(); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java deleted file mode 100644 index 08c8b94a2f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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 java.io.File; - -import org.junit.Assert; -import org.oasisopen.sca.NoRegisteredCallbackException; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackSetCallbackClient.class) -public class CallBackSetCallbackClientImpl implements CallBackSetCallbackClient { - - @Reference - protected ServiceReference aCallBackService; - @Reference - protected ServiceReference callBack; - - public void run() { - - // This test various aspects of the setCallback() API in a stateless - // scope. - - /* - * test4 Client does not implement the callback interface but calls - * setCallback with a service reference before invoking the target, - * Verify successful execution. - */ - - test4(); - - /* - * test5 The client does not implement the callback interface and does - * not call setCallback() before invoking the target. Verify a - * NoRegisteredCallbackException is thrown. - */ - - test5(); - - /* - * test6() The client calls setCallback() with an object that is not a - * service reference and the callback interface is stateless. Verify - * that an appropriate exception is thrown. When calling setCallback - * with an object the interface must be stateful. Stateless interfaces - * require a service Reference. - */ - - test6(); - - /* - * test10 The target calls setCallback() on its own service reference, - * e.g. getRequestContext().getServiceReference().getCallback(). Verify - * an appropriate exception occurs. - */ - - test10(); - } - - private void test4() { - - // - // Since callbacks do not synchronously return and this test results in - // a callback to a component other - // than this client I am using a marker file to determine the outcome. - // The presence of the marker - // file will be used for the Assertion test. If it exists then the - // callback occurred and all is good. - // - - // Make sure the marker file is not present before starting the test. - File aFile = new File("target/test4_marker"); - if (aFile.exists()) { - aFile.delete(); - } - - aCallBackService.setCallback(callBack); - - aCallBackService.getService().knockKnock("Knock Knock"); - - // Lets give the callback a little time to complete.... - - int count = 0; - long timeout = 1000; - - while (count++ < 30 && (aFile.exists() == false)) { - try { - Thread.sleep(timeout); - } catch (InterruptedException ie) { - } - } - - Assert.assertEquals("CallBackSetCallback - Test4", true, aFile.exists()); - - aCallBackService.setCallback(null); // leave this in the default state for next test - - } - - private void test5() { - - boolean correctException = false; - - // - // The backend service is expecting a callback reference to be set. This - // test will not - // set one so an exception is expected. According to the spec if a - // client calls a method on - // a service reference prior to calling setCallback() then a - // NoRegisteredCallbackException - // will be thrown on the client. - // - - try { - aCallBackService.getService().knockKnock("Knock Knock"); - } catch (NoRegisteredCallbackException NotRegEx) { - correctException = true; - } catch (Exception ex) { - ex.printStackTrace(); - } - - Assert.assertEquals("CallBackSetCallback - Test5", true, correctException); - - } - - private void test6() { - - boolean correctException = false; - - // - // This test is to specify an Object that is not a service reference - // that does implement - // the callback interface. However because this callback service is - // stateless the expected - // result is an appropriate exception. - // - - try { - aCallBackService.setCallback(new CallBackSetCallbackObjectCallback()); - aCallBackService.getService().knockKnock("Knock Knock"); - } - // - // This should catch an appropriate exception. - // - catch (IllegalArgumentException goodEx) { - correctException = true; - } catch (Exception ex) { - ex.printStackTrace(); - } - - Assert.assertEquals("CallBackSetCallback - Test6", true, correctException); - - } - - private void test10() { - - // - // The appropriate exception should be thrown and caught on the service side. - // If this happens, the setCallbackIllegally() method will return true. - // If not, this method will return false. - // - - aCallBackService.setCallback(callBack); // ensure no client-side exception - - boolean result = - aCallBackService.getService().setCallbackIllegally("Try to set callback on your own service reference"); - - Assert.assertEquals("CallBackSetCallback - Test10", true, result); - - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java deleted file mode 100644 index afedcdf7f1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.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; - -public class CallBackSetCallbackObjectCallback implements CallBackSetCallbackCallback { - - private int callBackCount = 0; - - public CallBackSetCallbackObjectCallback() { - super(); - } - - public void incrementCallBackCount() { - callBackCount++; - } - - public void callBackMessage(String aString) { - - System.out.println("Entering CallBackSetCallbackObjectCallback callBackMessage: " + aString); - - } - - public void callBackIncrement(String aString) { - System.out.println("Entering callback increment: " + aString); - this.incrementCallBackCount(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java deleted file mode 100644 index 78bc793c81..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.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.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(CallBackSetCalbackService.class) -public class CallBackSetCallbackServiceImpl implements CallBackSetCalbackService { - - @Callback - protected CallBackSetCallbackCallback callback; - @Context - protected ComponentContext context; - - public void knockKnock(String aString) { - - try { - System.out.println("CallBackBasicServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - System.out.println("CallBackBasicServiceImpl response sent"); - return; - } catch (Exception ex) { - ex.printStackTrace(); - } - - } - - public boolean setCallbackIllegally(String aString) { - - System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString); - - boolean exceptionProduced = false; - RequestContext requestContext = null; - ServiceReference serviceRef = null; - - try { - requestContext = context.getRequestContext(); - serviceRef = (ServiceReference)requestContext.getServiceReference(); - serviceRef.setCallback(serviceRef); - } catch (ClassCastException goodEx) { - exceptionProduced = true; - System.out.println("Test10 appropriate exception caught during setCallback to own service reference"); - } catch (Exception badEx) { - System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() " + badEx.toString()); - badEx.printStackTrace(); - } - - // Return a flag indicating whether we got the exception we are looking for - return exceptionProduced; - - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite deleted file mode 100644 index 274337fabc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.java deleted file mode 100644 index 5aaf596d85..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.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 junit.framework.TestCase; - -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; - -//FIXME Fix this test case -public class CallBackSetCallbackTestCase extends TestCase { - - private Node node; - private CallBackSetCallbackClient aCallBackClient; - - public void testCallBackSetCallback() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallBackSetCallbackTest.composite"); - node = - NodeFactory.newInstance().createNode("CallBackSetCallbackTest.composite", new Contribution("c1", location)); - node.start(); - aCallBackClient = node.getService(CallBackSetCallbackClient.class, "CallBackSetCallbackClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/pom.xml deleted file mode 100644 index f803c390be..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-callback-set-conversation - Apache Tuscany SCA iTest Callback Set Conversation - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java deleted file mode 100644 index 77837fdb77..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.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.test; - -import java.io.Serializable; - -import org.junit.Assert; - -public class CallBackSetCallbackConvBadCallback implements Serializable { - - public CallBackSetCallbackConvBadCallback() { - super(); - } - - public void callback(String aString) { - // - // This callback method should never be called. - // - System.out.println("CallBackSetCallbackBadCallback: callback called"); - Assert.fail("CallBackSetCallbackConvBadCallback: callback called"); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java deleted file mode 100644 index 825d1d6486..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.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.test; - -import org.oasisopen.sca.annotation.Conversational; - -// @Remotable -@Conversational -/** - * - */ -public interface CallBackSetCallbackConvCallback { - - void callBackMessage(String aString); - - void callBackIncrement(String aString); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java deleted file mode 100644 index b5c3e6e8b8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.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 CallBackSetCallbackConvClient { - - void run(); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java deleted file mode 100644 index 12a206affa..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackSetCallbackConvClient.class) -@Scope("CONVERSATION") -public class CallBackSetCallbackConvClientImpl implements CallBackSetCallbackConvClient { - - @Context - protected ComponentContext componentContext; - - @Reference - protected CallBackSetCallbackConvService aCallBackService; - - private CallBackSetCallbackConvObjectCallback aCallbackObject = null; - - public void run() { - - // This tests aspects of the setCallback() API within a conversational - // scope. - - /* - * test7 The client calls setCallback() with an object that is not a - * service reference and the callback interface is stateful. Verify - * successful execution. - */ - test7(); - - /* - * test8() The client calls setCallback() with an object that does not - * implement the callback interface. Verify an appropriate exception is - * thrown. This requires a STATEFUL interface. - */ - test8(); - - /* - * test9 The client calls setCallback() with an object that is not - * Serializable. Verify an appropriate exception is thrown. This - * requires a STATEFUL callback interface. Move from the stateless test - * case. - */ - test9(); - } - - private void test7() { - - // - // This test is to specify an Object that is not a service reference - // that does implement - // the callback interface and is Serializable. Verify successful - // execution. - // - - aCallbackObject = new CallBackSetCallbackConvObjectCallback(); - aCallbackObject.incrementCallBackCount(); - - ServiceReference aCallBackServiceRef = componentContext.cast(aCallBackService); - aCallBackServiceRef.setCallback(aCallbackObject); - aCallBackService.knockKnock("Knock Knock 7"); - - Assert.assertEquals("CallBackSetCallbackConv - Test7", 2, aCallbackObject.getCount()); - - } - - private void test8() { - - boolean correctException = false; - - // - // This test is to specify an Object that is not a service reference - // that does not implement - // the callback interface. The expected result is an appropriate - // exception. - // - - try { - ServiceReference aCallBackServiceRef = - componentContext.cast(aCallBackService); - aCallBackServiceRef.setCallback(new CallBackSetCallbackConvBadCallback()); - aCallBackService.knockKnock("Knock Knock 8"); - } - - // - // This should catch an appropriate exception. - // - - catch (IllegalArgumentException goodEx) { - System.out.println("correct exception " + goodEx); - correctException = true; - } - - catch (Exception ex) { - // This means an inappropriate exception occurred - ex.printStackTrace(); - } - - Assert.assertEquals("CallBackSetCallbackConv - Test8", true, correctException); - - } - - private void test9() { - - boolean correctException = false; - - // - // This test is to specify an Object that is not a service reference - // that does implement - // the callback interface but does not implement Serializable. Verify - // an appropriate exception - // is thrown. - // - - try { - ServiceReference aCallBackServiceRef = - componentContext.cast(aCallBackService); - aCallBackServiceRef.setCallback(new CallBackSetCallbackConvNonSerCallback()); - aCallBackService.knockKnock("Knock Knock 9"); - } - // - // This should catch an appropriate exception. - // - catch (IllegalArgumentException goodEx) { - System.out.println("correct exception " + goodEx); - correctException = true; - } catch (Exception ex) { - ex.printStackTrace(); - } - - Assert.assertEquals("CallBackSetCallbackConv - Test9", true, correctException); - - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java deleted file mode 100644 index bd17731fa1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.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.junit.Assert; - -public class CallBackSetCallbackConvNonSerCallback implements CallBackSetCallbackConvCallback { - - private int callBackCount = 0; - - public CallBackSetCallbackConvNonSerCallback() { - super(); - } - - public synchronized void incrementCallBackCount() { - callBackCount++; - } - - public synchronized int getCount() { - return callBackCount; - } - - public void callBackMessage(String aString) { - // - // This callback method should never be called. - // - System.out.println("Entering CallBackSetCallbackConvNonSerCallback callBackMessage: " + aString); - Assert.fail("CallBackSetCallbackConvNonSerCallback: callbackMessage called"); - } - - public void callBackIncrement(String aString) { - // - // This callback method should never be called. - // - System.out.println("Entering callbackIncrement: " + aString); - this.incrementCallBackCount(); - Assert.fail("CallBackSetCallbackConvNonSerCallback: callbackIncrement called"); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java deleted file mode 100644 index f7c718adab..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.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.test; - -import java.io.Serializable; - -public class CallBackSetCallbackConvObjectCallback implements CallBackSetCallbackConvCallback, Serializable { - private int callBackCount = 0; - - public CallBackSetCallbackConvObjectCallback() { - super(); - } - - public synchronized void incrementCallBackCount() { - callBackCount++; - } - - public synchronized int getCount() { - return callBackCount; - } - - public void callBackMessage(String aString) { - - System.out.println("Entering CallBackSetCallbackObjectCallback callBackMessage: " + aString); - - } - - public void callBackIncrement(String aString) { - - System.out.println("Entering callback increment: " + aString); - - this.incrementCallBackCount(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java deleted file mode 100644 index 74c19961ba..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.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.test; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Conversational; - -// @Remotable -@Conversational -@Callback(CallBackSetCallbackConvCallback.class) -/** - * - */ -public interface CallBackSetCallbackConvService { - - void knockKnock(String aString); - - void setCallbackIllegally(String aString); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java deleted file mode 100644 index d79b9278e2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.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; - -import java.io.File; - -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.Scope; -import org.oasisopen.sca.annotation.Service; - -@Service(CallBackSetCallbackConvService.class) -@Scope("CONVERSATION") -public class CallBackSetCallbackConvServiceImpl implements CallBackSetCallbackConvService { - - @Callback - protected CallBackSetCallbackConvCallback callback; - @Context - protected ComponentContext context; - - public void knockKnock(String aString) { - - System.out.println("CallBackSetCallbackConvServiceImpl message received: " + aString); - callback.callBackMessage("Who's There"); - callback.callBackIncrement("This should do it"); - System.out.println("CallBackSetCallbackConvServiceImpl response sent"); - - } - - public void setCallbackIllegally(String aString) { - - System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString); - - boolean exceptionProduced = false; - RequestContext requestContext = null; - ServiceReference serviceRef = null; - - // Context is not working properly so we can't trust that this is - // working..... - try { - requestContext = context.getRequestContext(); - serviceRef = (ServiceReference)requestContext.getServiceReference(); - } catch (Exception ex) { - System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() " + ex.toString()); - ex.printStackTrace(); - return; - } - - // Ok, call setCallback with my own service reference. - try { - serviceRef.setCallback(serviceRef); - } catch (NullPointerException npe) { - // This is not an appropriate exception. - System.out.println("Test10 NPE exception during setCallback to own service reference"); - npe.printStackTrace(); - return; - } - // This needs to catch the appropriate exception, once we figure out - // what is needs to be! - catch (Exception ex) { - exceptionProduced = true; - System.out.println("Test10 appropriate exception caught during setCallback to own service reference"); - } - ; - - // If we get the exception we are looking for then create the marker - // file. - if (exceptionProduced == true) { - File aFile = new File("target/test10_marker"); - try { - aFile.createNewFile(); - } catch (Exception ex) { - System.out.println("Error Creating target/test10_marker marker file"); - ex.printStackTrace(); - } - } - - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite deleted file mode 100644 index 831e488f1b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCase.java deleted file mode 100644 index a61682da06..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCase.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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 CallBackSetCallbackConvTestCase { - - private Node node; - private CallBackSetCallbackConvClient aCallBackClient; - - @Test - public void testCallBackSetCallback() { - aCallBackClient.run(); - } - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("CallBackSetCallbackConvTest.composite"); - node = NodeFactory.newInstance().createNode("CallBackSetCallbackConvTest.composite", new Contribution("c1", location)); - node.start(); - aCallBackClient = node.getService(CallBackSetCallbackConvClient.class, "CallBackSetCallbackConvClient"); - } - - @After - public void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/component-type/pom.xml deleted file mode 100644 index 4905a77f58..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/component-type/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-component-type - Apache Tuscany SCA iTest Component Type - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - runtime - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/AddService.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/AddServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 8b6fe066a6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorClient.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 6f978bd9be..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorService.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 1209ac128a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/DivideService.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/DivideServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index f7ac0b7287..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/MultiplyService.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index b7dca792b2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/SubtractService.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 77b128ab8d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/Calculator.composite b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/Calculator.composite deleted file mode 100644 index 1245792edb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType deleted file mode 100644 index 78e169deb4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType deleted file mode 100644 index 5d66becedf..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType deleted file mode 100644 index 22236ae0d0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType deleted file mode 100644 index 2035d617e5..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType deleted file mode 100644 index fe76f553be..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/component-type/src/test/java/calculator/CalculatorTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/component-type/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index ac3ccc3d08..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/pom.xml deleted file mode 100644 index 7a924199dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-contribution-folder - Apache Tuscany SCA iTest Contribution Folder - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - runtime - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/java/calculator/CalculatorService.java b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/java/calculator/CalculatorService.java deleted file mode 100644 index a318cf50d9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java deleted file mode 100644 index 0c8f84d7cc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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: 608205 $ $Date: 2008-01-02 20:29:05 +0000 (Wed, 02 Jan 2008) $ - */ -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/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite deleted file mode 100644 index e11d44fe58..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml deleted file mode 100644 index 10140b7bc1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar deleted file mode 100644 index fe264693fe..0000000000 Binary files a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar and /dev/null differ diff --git a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar deleted file mode 100644 index d5dfb647d3..0000000000 Binary files a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar and /dev/null differ diff --git a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository3/contribution.zip b/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository3/contribution.zip deleted file mode 100644 index b293aa4bcc..0000000000 Binary files a/tags/java/sca/2.0-M3-RC5/itest/contribution-folder/src/test/resources/repository3/contribution.zip and /dev/null differ diff --git a/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/pom.xml deleted file mode 100644 index 1bacaabbb2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-contribution-zip - Apache Tuscany SCA iTest Contribution ZIP - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - runtime - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/java/calculator/CalculatorService.java b/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/java/calculator/CalculatorService.java deleted file mode 100644 index a318cf50d9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java deleted file mode 100644 index 303e2a6d9a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/resources/repository/contribution.zip b/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/resources/repository/contribution.zip deleted file mode 100644 index 3239ae1242..0000000000 Binary files a/tags/java/sca/2.0-M3-RC5/itest/contribution-zip/src/test/resources/repository/contribution.zip and /dev/null differ diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/conversations/pom.xml deleted file mode 100644 index c635d99d4c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-conversations - Apache Tuscany SCA iTest Conversations - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/Record.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/Record.java deleted file mode 100644 index a3b83dfc14..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/Record.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.itest; - -import java.io.Serializable; - -/** - * @version $Rev$ $Date$ - */ -public class Record implements Serializable { - public String id; - public String conversationId; -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/TestResult.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/TestResult.java deleted file mode 100644 index 946ad93d7d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/TestResult.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 java.util.Hashtable; - -/** - * @version $Rev$ $Date$ - */ -public class TestResult { - public static Hashtable results = new Hashtable(); - private static int completed = 0; - - public static synchronized void updateCompleted() { - ++completed; - } - - public static synchronized int getCompleted() { - return completed; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/AService.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/AService.java deleted file mode 100644 index 27939e3996..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/AService.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.itest.conversational; - -import org.oasisopen.sca.annotation.Conversational; - -/** - * Simple conversational Service that uses another Conversational Service - */ -@Conversational -public interface AService { - - /** - * Returns the state for this service. - * - * @return The state for this service - */ - String getState(); - - /** - * Returns the state for the other service that this service is using - * - * @return The state for the other service that this service is using - */ - String getStateOnB(); - - /** - * Sets the state for this service. - * - * @param aState The state for this service - */ - void setState(String aState); - - /** - * Sets the state for the other service that this service is using - * - * @param aState The state for the other service that this service is using - */ - void setStateOnB(String aState); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Alpha.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Alpha.java deleted file mode 100644 index 7887417e55..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Alpha.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.itest.conversational; - -import org.oasisopen.sca.annotation.OneWay; -import org.oasisopen.sca.annotation.Remotable; - -/** - * @version $Rev$ $Date$ - */ - -@Remotable -public interface Alpha { - @OneWay - void run(int param); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/BService.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/BService.java deleted file mode 100644 index 735bcee176..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/BService.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.itest.conversational; - -import org.oasisopen.sca.annotation.Conversational; - -/** - * Simple conversational Service - */ -@Conversational -public interface BService { - - /** - * Returns the state for this service. - * - * @return The state for this service - */ - String getState(); - - /** - * Sets the state for this service. - * - * @param aState The state for this service - */ - void setState(String aState); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Beta.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Beta.java deleted file mode 100644 index 1c5d2cdbb8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Beta.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.conversational; - -import org.oasisopen.sca.CallableReference; -import org.oasisopen.sca.annotation.Remotable; - -/** - * @version $Rev$ $Date$ - */ - -@Remotable -public interface Beta { - CallableReference getRef(int param); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/CService.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/CService.java deleted file mode 100644 index cebbea0701..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/CService.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.itest.conversational; - -import org.oasisopen.sca.annotation.Conversational; - -/** - * Simple conversational Service that uses another Conversational Service - */ -@Conversational -public interface CService { - - String getState(); - - void setState(String aState); - - Object getConversationID(); - - Object getConversationObjectConversationId(); - - void setConversationID(String theID); - - void endConversation(); - - void endConversationViaAnnotatedMethod(); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Constants.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Constants.java deleted file mode 100644 index 3f04e9f09e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Constants.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.conversational; - -public interface Constants { - - String A_INITIAL_VALUE = "Initial Value of A"; - String B_INITIAL_VALUE = "Initial Value of B"; -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationIdService.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationIdService.java deleted file mode 100644 index 9ca4abb9d3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationIdService.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.conversational; - -import org.oasisopen.sca.annotation.Conversational; - -@Conversational -public interface ConversationIdService { - - String getCIDField(); - - String getCIDSetter(); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java deleted file mode 100644 index 734fb9fe7b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.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.conversational; - -import org.oasisopen.sca.annotation.Conversational; -import org.oasisopen.sca.annotation.EndsConversation; -import org.oasisopen.sca.annotation.Remotable; - -/** - * The callback interface used when testing conversational callbacks - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Remotable -@Conversational -public interface ConversationalCallback { - - void init(); - - void destroy(); - - void initializeCount(int count); - - void incrementCount(); - - int retrieveCount(); - - void businessException() throws Exception; - - @EndsConversation - String endConversation(); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java deleted file mode 100644 index 99f4c85d8f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.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 org.apache.tuscany.sca.itest.conversational; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The client for the conversational itest. Is implemented by clients - * offering both stateless and stateful callbacks - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ - -@Remotable -public interface ConversationalClient { - - int runConversationFromInjectedReference(); - - int runConversationFromInjectedReference2(); - - int runConversationFromServiceReference(); - - int runConversationWithUserDefinedConversationId(); - - String runConversationCheckUserDefinedConversationId(); - - int runConversationCheckingScope(); - - int runConversationWithCallback(); - - int runConversationHavingPassedReference(); - - String runConversationBusinessException(); - - String runConversationBusinessExceptionCallback(); - - int runConversationCallingEndedConversation(); - - int runConversationCallingEndedConversationCallback(); - - String runConversationCallingEndedConversationCheckConversationId(); - - String runConversationCallingEndedConversationCallbackCheckConversationId(); - - int runConversationAgeTimeout(); - - int runConversationIdleTimeout(); - - int runConversationPrincipleError(); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java deleted file mode 100644 index fb4ecb56e7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.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.conversational; - -import org.oasisopen.sca.CallableReference; -import org.oasisopen.sca.annotation.Remotable; - -/** - * The client that calls into an existing conversation by accepting - * a reference to that conversation - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ - -@Remotable -public interface ConversationalReferenceClient { - - void incrementCount(CallableReference conversationalService); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java deleted file mode 100644 index 21a4db737e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.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.itest.conversational; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Conversational; -import org.oasisopen.sca.annotation.EndsConversation; -import org.oasisopen.sca.annotation.Remotable; - -/** - * The service interface used when testing conversations - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Remotable -@Conversational -@Callback(ConversationalCallback.class) -public interface ConversationalService { - - void init(); - - void destroy(); - - void initializeCount(int count); - - void incrementCount(); - - int retrieveCount(); - - void businessException() throws Exception; - - void initializeCountCallback(int count); - - void incrementCountCallback(); - - int retrieveCountCallback(); - - void businessExceptionCallback() throws Exception; - - @EndsConversation - String endConversation(); - - String endConversationCallback(); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalServiceNonConversationalCallback.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalServiceNonConversationalCallback.java deleted file mode 100644 index 48c1644b87..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalServiceNonConversationalCallback.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.itest.conversational; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Conversational; -import org.oasisopen.sca.annotation.EndsConversation; -import org.oasisopen.sca.annotation.Remotable; - -/** - * The service interface used when testing conversations - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Remotable -@Conversational -@Callback(NonConversationalCallback.class) -public interface ConversationalServiceNonConversationalCallback { - - void init(); - - void destroy(); - - void initializeCount(int count); - - void incrementCount(); - - int retrieveCount(); - - void businessException() throws Exception; - - void initializeCountCallback(int count); - - void incrementCountCallback(); - - int retrieveCountCallback(); - - void businessExceptionCallback() throws Exception; - - @EndsConversation - String endConversation(); - - String endConversationCallback(); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/DService.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/DService.java deleted file mode 100644 index 2c205c2cae..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/DService.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.conversational; - -import org.oasisopen.sca.annotation.Conversational; -import org.oasisopen.sca.annotation.EndsConversation; - -/** - * Simple conversational Service - */ -@Conversational -public interface DService { - - /** - * Returns the state for this service. - * - * @return The state for this service - */ - String getState(); - - /** - * Sets the state for this service. - * - * @param aState The state for this service - */ - void setState(String aState); - - @EndsConversation - void endConversationViaAnnotatedMethod(); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Gamma.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Gamma.java deleted file mode 100644 index 48c203ab35..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/Gamma.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.conversational; - -import org.apache.tuscany.sca.itest.Record; -import org.oasisopen.sca.annotation.Conversational; -import org.oasisopen.sca.annotation.EndsConversation; -import org.oasisopen.sca.annotation.Remotable; - -/** - * @version $Rev$ $Date$ - */ - -@Remotable -@Conversational -public interface Gamma { - void start(int param); - - boolean hasNext(); - - Record next(); - - @EndsConversation - void stop(); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallback.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallback.java deleted file mode 100644 index 614c0a96b5..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/NonConversationalCallback.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.conversational; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The callback interface used when testing conversational callbacks - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Remotable -public interface NonConversationalCallback { - - void init(); - - void destroy(); - - void initializeCount(int count); - - void incrementCount(); - - int retrieveCount(); - - void businessException() throws Exception; - - String endConversation(); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AServiceImpl.java deleted file mode 100644 index 86a96aaa75..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AServiceImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.AService; -import org.apache.tuscany.sca.itest.conversational.BService; -import org.apache.tuscany.sca.itest.conversational.Constants; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Simple conversational Service that uses another Conversational Service - */ -@Service(AService.class) -@Scope("CONVERSATION") -public class AServiceImpl implements AService { - - /** - * The state - */ - private String state = Constants.A_INITIAL_VALUE; - - /** - * The reference to the other service - */ - private BService b; - - /** - * Constructor - * - */ - public AServiceImpl() { - System.out.println("---> AServiceImpl constructor for " + this); - } - - /** - * Inject the reference to the other service - * @param aB The other service. - */ - @Reference(name = "b") - public void setB(BService aB) { - System.out.println("---> Setting reference to B on " + this + " to " + aB); - this.b = aB; - } - - /** - * Returns the state for this service. - * - * @return The state for this service - */ - public String getState() { - return state; - } - - /** - * Returns the state for the other service that this service is using - * - * @return The state for the other service that this service is using - */ - public String getStateOnB() { - return b.getState(); - } - - /** - * Sets the state for this service. - * - * @param aState The state for this service - */ - public void setState(String aState) { - this.state = aState; - } - - /** - * Sets the state for the other service that this service is using - * - * @param aState The state for the other service that this service is using - */ - public void setStateOnB(String aState) { - b.setState(aState); - } - - /** - * Sets the conversation ID for this service - * @param id The Conversation ID - */ - @ConversationID - public void setConversationID(String id) { - System.out.println("Conversation ID for " + this + " is set to " + id); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AlphaImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AlphaImpl.java deleted file mode 100644 index b56186ea88..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/AlphaImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.Record; -import org.apache.tuscany.sca.itest.TestResult; -import org.apache.tuscany.sca.itest.conversational.Alpha; -import org.apache.tuscany.sca.itest.conversational.Beta; -import org.apache.tuscany.sca.itest.conversational.Gamma; -import org.oasisopen.sca.CallableReference; -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ - -@Service(Alpha.class) -@Scope("COMPOSITE") -public class AlphaImpl implements Alpha { - @Reference - public Beta beta; - - @Context - protected ComponentContext componentContext; - - public void run(int param) { - CallableReference gammaRef = null; - boolean testPassed = true; - try { - gammaRef = beta.getRef(param); - while (gammaRef.getService().hasNext()) { - Record record = gammaRef.getService().next(); - if (!record.conversationId.equals(gammaRef.getConversation().getConversationID())) { - // Record returned is not from this conversation. - testPassed = false; - } - } - } catch (Exception ex) { - testPassed = false; - ex.printStackTrace(); - } finally { - TestResult.updateCompleted(); - if (gammaRef != null) { - TestResult.results.put(gammaRef.getConversation().getConversationID(), testPassed); - gammaRef.getService().stop(); - } - } - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BServiceImpl.java deleted file mode 100644 index f394770ffc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BServiceImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.BService; -import org.apache.tuscany.sca.itest.conversational.Constants; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Simple conversational Service - */ -@Service(BService.class) -@Scope("CONVERSATION") -public class BServiceImpl implements BService { - - /** - * The state for this service - */ - private String state = Constants.B_INITIAL_VALUE; - - /** - * Constructor - */ - public BServiceImpl() { - System.out.println("---> BServiceImpl constructor for " + this); - } - - /** - * Returns the state for this service. - * - * @return The state for this service - */ - public String getState() { - return state; - } - - /** - * Sets the state for this service. - * - * @param aState The state for this service - */ - public void setState(String aState) { - this.state = aState; - } - - /** - * Sets the conversation ID for this service - * @param id The Conversation ID - */ - @ConversationID - public void setConversationID(String id) { - System.out.println("Conversation ID for " + this + " is set to " + id); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BetaImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BetaImpl.java deleted file mode 100644 index b94e8a6452..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/BetaImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.Beta; -import org.apache.tuscany.sca.itest.conversational.Gamma; -import org.oasisopen.sca.CallableReference; -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.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ - -@Service(Beta.class) -@Scope("COMPOSITE") -public class BetaImpl implements Beta { - @Context - protected ComponentContext componentContext; - - @Reference - public Gamma gamma; - - public CallableReference getRef(int param) { - ServiceReference gammaRef = componentContext.getServiceReference(Gamma.class, "gamma"); - Gamma g = gammaRef.getService(); - g.start(param); - return gammaRef; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/CServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/CServiceImpl.java deleted file mode 100644 index 737c2940dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/CServiceImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.CService; -import org.apache.tuscany.sca.itest.conversational.DService; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Simple conversational Service that uses another Conversational Service - */ -@Service(CService.class) -@Scope("CONVERSATION") -public class CServiceImpl implements CService { - - private ServiceReference dServiceRef; - - @Reference(name = "d") - public void setD(ServiceReference servRef) { - this.dServiceRef = servRef; - } - - public String getState() { - return dServiceRef.getService().getState(); - } - - public void setState(String aState) { - dServiceRef.getService().setState(aState); - } - - /* - * When the coversationId is set manually the client may access the - * conversation id that will be used by the reference using - * ServiceReference.getConversationId() - */ - public Object getConversationID() { - return dServiceRef.getConversationID(); - } - - /* - * Whether the conversation ID is chosen by the client or is generated by - * the system, the client may access the conversation ID by calling - * Conversation.getConversationID(). - */ - public Object getConversationObjectConversationId() { - // TODO Auto-generated method stub - if (dServiceRef.getConversation() != null) { - return dServiceRef.getConversation().getConversationID(); - } else { - return null; - } - } - - public void endConversation() { - dServiceRef.getConversation().end(); - } - - public void endConversationViaAnnotatedMethod() { - dServiceRef.getService().endConversationViaAnnotatedMethod(); - } - - public void setConversationID(String theID) { - dServiceRef.setConversationID(theID); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java deleted file mode 100644 index 8f2736ad2d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.annotation.ConversationAttributes; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -@Service(ConversationalService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge = "1 seconds") -public class ConversationAgeComponentImpl implements ConversationalService { - - private int count; - - public void businessException() throws Exception { - } - - public void businessExceptionCallback() throws Exception { - } - - public void destroy() { - } - - public String endConversation() { - return null; - } - - public String endConversationCallback() { - return null; - } - - public void incrementCount() { - } - - public void incrementCountCallback() { - } - - public void init() { - } - - public void initializeCount(int count) { - this.count = count; - } - - public void initializeCountCallback(int count) { - } - - public int retrieveCount() { - return count; - } - - public int retrieveCountCallback() { - return 0; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java deleted file mode 100644 index 8b3a8663d8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationIdService; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -@Service(ConversationIdService.class) -@Scope("CONVERSATION") -public class ConversationIdComponentImpl implements ConversationIdService { - - @ConversationID - public String cid; - - private String setterCid; - - public String getCIDField() { - return cid; - } - - public String getCIDSetter() { - return setterCid; - } - - @ConversationID - public void setCID(String cid) { - this.setterCid = cid; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java deleted file mode 100644 index ae8bee8040..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.annotation.ConversationAttributes; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -@Service(ConversationalService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxIdleTime = "1 seconds") -public class ConversationMaxIdleComponentImpl implements ConversationalService { - - private int count; - - public void businessException() throws Exception { - } - - public void businessExceptionCallback() throws Exception { - } - - public void destroy() { - } - - public String endConversation() { - return null; - } - - public String endConversationCallback() { - return null; - } - - public void incrementCount() { - } - - public void incrementCountCallback() { - } - - public void init() { - } - - public void initializeCount(int count) { - this.count = count; - } - - public void initializeCountCallback(int count) { - } - - public int retrieveCount() { - return count; - } - - public int retrieveCountCallback() { - return 0; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java deleted file mode 100644 index 3784dfd53e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; -import org.apache.tuscany.sca.itest.conversational.ConversationalClient; -import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient; -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.ConversationAttributes; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * The client for the conversational itest which presents a stateful - * callback interface - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ - -@Service(interfaces = {ConversationalClient.class}) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge = "10 minutes", maxIdleTime = "5 minutes", singlePrincipal = false) -public class ConversationalClientStatefulImpl implements ConversationalClient, ConversationalCallback { - - @Context - protected ComponentContext componentContext; - - @Reference - protected ConversationalService conversationalService; - - @Reference - protected ConversationalService conversationalService2; - - @Reference - protected ConversationalReferenceClient conversationalReferenceClient; - - private int clientCount = 0; - private int callbackCount = 0; - - // a static member variable that records the number of times this service is called - public static StringBuffer calls = new StringBuffer(); - - // From ConversationalClient - public int runConversationFromInjectedReference() { - calls.append("runConversationFromInjectedReference,"); - conversationalService.initializeCount(1); - conversationalService.incrementCount(); - clientCount = conversationalService.retrieveCount(); - conversationalService.endConversation(); - - return clientCount; - } - - public int runConversationFromInjectedReference2() { - calls.append("runConversationFromInjectedReference2,"); - - conversationalService2.initializeCount(1); - conversationalService2.incrementCount(); - - // stick in a call to the first reference to - // make sure the two references don't clash - conversationalService.initializeCount(1); - - clientCount = conversationalService2.retrieveCount(); - conversationalService2.endConversation(); - - // end the conversation through the first reference - conversationalService.endConversation(); - - return clientCount; - } - - public int runConversationFromServiceReference() { - calls.append("runConversationFromServiceReference,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - // serviceReference.getConversation().end(); - - return clientCount; - } - - public int runConversationWithUserDefinedConversationId() { - calls.append("runConversationWithUserDefinedConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation1"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - // serviceReference.getConversation().end(); - - return clientCount; - } - - public String runConversationCheckUserDefinedConversationId() { - calls.append("runConversationCheckUserDefinedConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation2"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - - String clientConversationId = serviceReference.getConversationID().toString(); - String serverConversationId = callableReference.endConversation(); - - if (clientConversationId.equals("MyConversation2") && serverConversationId.equals("MyConversation2")) { - return clientConversationId; - } else { - return "client = " + clientConversationId + "server = " + serverConversationId; - } - - } - - public int runConversationCheckingScope() { - calls.append("runConversationCheckingScope,"); - // run a conversation - return runConversationFromInjectedReference(); - - // test will then use a static method to find out how many times - // init/destroy were called - } - - public int runConversationWithCallback() { - calls.append("runConversationWithCallback,"); - callbackCount = 2; - conversationalService.initializeCountCallback(1); - conversationalService.incrementCountCallback(); - clientCount = conversationalService.retrieveCountCallback(); - conversationalService.endConversationCallback(); - - return clientCount; - } - - public int runConversationHavingPassedReference() { - calls.append("runConversationHavingPassedReference,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - conversationalReferenceClient.incrementCount(serviceReference); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - serviceReference.getConversation().end(); - - return clientCount; - } - - public String runConversationBusinessException() { - calls.append("runConversationbusinessException,"); - try { - conversationalService.initializeCount(1); - conversationalService.businessException(); - clientCount = conversationalService.retrieveCount(); - conversationalService.endConversation(); - } catch (Exception ex) { - return ex.getMessage(); - } - - return "No Exception Returned"; - } - - public String runConversationBusinessExceptionCallback() { - calls.append("runConversationbusinessExceptionCallback,"); - try { - conversationalService.initializeCountCallback(1); - conversationalService.businessExceptionCallback(); - clientCount = conversationalService.retrieveCountCallback(); - conversationalService.endConversationCallback(); - } catch (Exception ex) { - return ex.getMessage(); - } - - return "No Exception Returned"; - } - - public int runConversationCallingEndedConversation() { - calls.append("runConversationCallingEndedConversation,"); - conversationalService.initializeCount(1); - conversationalService.endConversation(); - return conversationalService.retrieveCount(); - } - - public int runConversationCallingEndedConversationCallback() { - calls.append("runConversationCallingEndedConversationCallback,"); - conversationalService.initializeCountCallback(1); - conversationalService.endConversationCallback(); - return conversationalService.retrieveCountCallback(); - } - - public String runConversationCallingEndedConversationCheckConversationId() { - calls.append("runConversationCallingEndedConversationCheckConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation3"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - if (serviceReference.getConversation() == null) { - return null; - } else { - return serviceReference.getConversation().getConversationID().toString(); - } - } - - public String runConversationCallingEndedConversationCallbackCheckConversationId() { - calls.append("runConversationCallingEndedConversationCallbackCheckConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation3"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversationCallback(); - - if (serviceReference.getConversation() == null) { - return null; - } else { - return serviceReference.getConversation().getConversationID().toString(); - } - } - - public int runConversationAgeTimeout() { - calls.append("runConversationAgeTimeout,"); - // done in other testing - return clientCount; - } - - public int runConversationIdleTimeout() { - calls.append("runConversationIdleTimeout,"); - // done in other testing - return clientCount; - } - - public int runConversationPrincipleError() { - calls.append("runConversationPrincipleError,"); - // TODO - when policy framework is done - return clientCount; - } - - // From ConversationalCallback - @Init - public void init() { - calls.append("init,"); - } - - @Destroy - public void destroy() { - calls.append("destroy,"); - } - - public void initializeCount(int count) { - calls.append("initializeCount,"); - callbackCount += count; - } - - public void incrementCount() { - calls.append("incrementCount,"); - callbackCount++; - } - - public int retrieveCount() { - calls.append("retrieveCount,"); - return callbackCount; - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public String endConversation() { - calls.append("endConversation,"); - callbackCount = 0; - return null; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulNonConversationalCallbackImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulNonConversationalCallbackImpl.java deleted file mode 100644 index 5823b7d050..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulNonConversationalCallbackImpl.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalClient; -import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient; -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.apache.tuscany.sca.itest.conversational.ConversationalServiceNonConversationalCallback; -import org.apache.tuscany.sca.itest.conversational.NonConversationalCallback; -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.ConversationAttributes; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * The client for the conversational itest which presents a stateful - * callback interface - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ - -@Service(interfaces = {ConversationalClient.class}) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge = "10 minutes", maxIdleTime = "5 minutes", singlePrincipal = false) -public class ConversationalClientStatefulNonConversationalCallbackImpl implements ConversationalClient, - NonConversationalCallback { - - @Context - protected ComponentContext componentContext; - - @Reference - protected ConversationalServiceNonConversationalCallback conversationalService; - - @Reference - protected ConversationalServiceNonConversationalCallback conversationalService2; - - @Reference - protected ConversationalReferenceClient conversationalReferenceClient; - - private int clientCount = 0; - private int callbackCount = 0; - - // a static member variable that records the number of times this service is called - public static StringBuffer calls = new StringBuffer(); - - // From ConversationalClient - public int runConversationFromInjectedReference() { - calls.append("runConversationFromInjectedReference,"); - conversationalService.initializeCount(1); - conversationalService.incrementCount(); - clientCount = conversationalService.retrieveCount(); - conversationalService.endConversation(); - - return clientCount; - } - - public int runConversationFromInjectedReference2() { - calls.append("runConversationFromInjectedReference2,"); - - conversationalService2.initializeCount(1); - conversationalService2.incrementCount(); - - // stick in a call to the first reference to - // make sure the two references don't clash - conversationalService.initializeCount(1); - - clientCount = conversationalService2.retrieveCount(); - conversationalService2.endConversation(); - - // end the conversation through the first reference - conversationalService.endConversation(); - - return clientCount; - } - - public int runConversationFromServiceReference() { - calls.append("runConversationFromServiceReference,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - // serviceReference.getConversation().end(); - - return clientCount; - } - - public int runConversationWithUserDefinedConversationId() { - calls.append("runConversationWithUserDefinedConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation1"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - // serviceReference.getConversation().end(); - - return clientCount; - } - - public String runConversationCheckUserDefinedConversationId() { - calls.append("runConversationCheckUserDefinedConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation2"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - return callableReference.endConversation(); - - } - - public int runConversationCheckingScope() { - calls.append("runConversationCheckingScope,"); - // run a conversation - return runConversationFromInjectedReference(); - - // test will then use a static method to find out how many times - // init/destroy were called - } - - public int runConversationWithCallback() { - calls.append("runConversationWithCallback,"); - callbackCount = 2; - conversationalService.initializeCountCallback(1); - conversationalService.incrementCountCallback(); - clientCount = conversationalService.retrieveCountCallback(); - conversationalService.endConversationCallback(); - - return clientCount; - } - - public int runConversationHavingPassedReference() { - calls.append("runConversationHavingPassedReference,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - conversationalReferenceClient.incrementCount(serviceReference); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - // serviceReference.getConversation().end(); - - return clientCount; - } - - public String runConversationBusinessException() { - calls.append("runConversationbusinessException,"); - try { - conversationalService.initializeCount(1); - conversationalService.businessException(); - clientCount = conversationalService.retrieveCount(); - conversationalService.endConversation(); - } catch (Exception ex) { - return ex.getMessage(); - } - - return "No Exception Returned"; - } - - public String runConversationBusinessExceptionCallback() { - calls.append("runConversationbusinessExceptionCallback,"); - try { - conversationalService.initializeCountCallback(1); - conversationalService.businessExceptionCallback(); - clientCount = conversationalService.retrieveCountCallback(); - conversationalService.endConversationCallback(); - } catch (Exception ex) { - return ex.getMessage(); - } - - return "No Exception Returned"; - } - - public String runConversationCallingEndedConversationCheckConversationId() { - calls.append("runConversationCallingEndedConversationCheckConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation3"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - if (serviceReference.getConversation() == null) { - return null; - } else { - return serviceReference.getConversation().getConversationID().toString(); - } - } - - public String runConversationCallingEndedConversationCallbackCheckConversationId() { - calls.append("runConversationCallingEndedConversationCallbackCheckConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation3"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversationCallback(); - - if (serviceReference.getConversation() == null) { - return null; - } else { - return serviceReference.getConversation().getConversationID().toString(); - } - } - - public int runConversationCallingEndedConversation() { - calls.append("runConversationCallingEndedConversation,"); - conversationalService.initializeCount(1); - conversationalService.endConversation(); - return conversationalService.retrieveCount(); - } - - public int runConversationCallingEndedConversationCallback() { - calls.append("runConversationCallingEndedConversationCallback,"); - conversationalService.initializeCountCallback(1); - conversationalService.endConversationCallback(); - return conversationalService.retrieveCountCallback(); - } - - public int runConversationAgeTimeout() { - calls.append("runConversationAgeTimeout,"); - // done in other testing - return clientCount; - } - - public int runConversationIdleTimeout() { - calls.append("runConversationIdleTimeout,"); - // done in other testing - return clientCount; - } - - public int runConversationPrincipleError() { - calls.append("runConversationPrincipleError,"); - // TODO - when policy framework is done - return clientCount; - } - - // From ConversationalCallback - @Init - public void init() { - calls.append("init,"); - } - - @Destroy - public void destroy() { - calls.append("destroy,"); - } - - public void initializeCount(int count) { - calls.append("initializeCount,"); - callbackCount += count; - } - - public void incrementCount() { - calls.append("incrementCount,"); - callbackCount++; - } - - public int retrieveCount() { - calls.append("retrieveCount,"); - return callbackCount; - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public String endConversation() { - calls.append("endConversation,"); - return null; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java deleted file mode 100644 index c9c5138515..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; -import org.apache.tuscany.sca.itest.conversational.ConversationalClient; -import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient; -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -/** - * The client for the conversational itest which presents a stateful - * callback interface - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ - -@Service(interfaces = {ConversationalClient.class}) -public class ConversationalClientStatelessImpl implements ConversationalClient, ConversationalCallback { - - @Context - protected ComponentContext componentContext; - - @Reference - protected ConversationalService conversationalService; - - @Reference - protected ConversationalService conversationalService2; - - @Reference - protected ConversationalReferenceClient conversationalReferenceClient; - - private int clientCount = 0; - private int callbackCount = 0; - - // a static member variable that records the number of times this service is called - public static StringBuffer calls = new StringBuffer(); - - // From ConversationalClient - public int runConversationFromInjectedReference() { - calls.append("runConversationFromInjectedReference,"); - conversationalService.initializeCount(1); - conversationalService.incrementCount(); - clientCount = conversationalService.retrieveCount(); - conversationalService.endConversation(); - - return clientCount; - } - - public int runConversationFromInjectedReference2() { - calls.append("runConversationFromInjectedReference2,"); - - // now test the second reference - conversationalService2.initializeCount(1); - conversationalService2.incrementCount(); - - // stick in a call to the first reference to - // make sure the two references don't clash - conversationalService.initializeCount(1); - - clientCount = conversationalService2.retrieveCount(); - conversationalService2.endConversation(); - - // end the conversation through the first reference - conversationalService.endConversation(); - - return clientCount; - } - - public int runConversationFromServiceReference() { - calls.append("runConversationFromServiceReference,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - // serviceReference.getConversation().end(); - - return clientCount; - } - - public int runConversationWithUserDefinedConversationId() { - calls.append("runConversationWithUserDefinedConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation1"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - // serviceReference.getConversation().end(); - - return clientCount; - } - - public String runConversationCheckUserDefinedConversationId() { - calls.append("runConversationCheckUserDefinedConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation2"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - - String clientConversationId = serviceReference.getConversationID().toString(); - String serverConfersationId = callableReference.endConversation(); - - if (clientConversationId.equals("MyConversation2") && serverConfersationId.equals("MyConversation2")) { - return clientConversationId; - } else { - return "client = " + clientConversationId + "server = " + serverConfersationId; - } - } - - public int runConversationCheckingScope() { - calls.append("runConversationCheckingScope,"); - // run a conversation - return runConversationFromInjectedReference(); - - // test will then use a static method to find out how many times - // init/destroy were called - } - - public int runConversationWithCallback() { - calls.append("runConversationWithCallback,"); - conversationalService.initializeCountCallback(1); - conversationalService.incrementCountCallback(); - clientCount = conversationalService.retrieveCountCallback(); - conversationalService.endConversationCallback(); - - return clientCount; - } - - public int runConversationHavingPassedReference() { - calls.append("runConversationHavingPassedReference,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - conversationalReferenceClient.incrementCount(serviceReference); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - serviceReference.getConversation().end(); - - return clientCount; - } - - public String runConversationBusinessException() { - calls.append("runConversationbusinessException,"); - try { - conversationalService.initializeCount(1); - conversationalService.businessException(); - clientCount = conversationalService.retrieveCount(); - conversationalService.endConversation(); - } catch (Exception ex) { - return ex.getMessage(); - } - - return "No Exception Returned"; - } - - public String runConversationBusinessExceptionCallback() { - calls.append("runConversationbusinessExceptionCallback,"); - try { - conversationalService.initializeCountCallback(1); - conversationalService.businessExceptionCallback(); - clientCount = conversationalService.retrieveCountCallback(); - conversationalService.endConversationCallback(); - } catch (Exception ex) { - return ex.getMessage(); - } - - return "No Exception Returned"; - } - - public int runConversationCallingEndedConversation() { - calls.append("runConversationCallingEndedConversation,"); - conversationalService.initializeCount(1); - conversationalService.endConversation(); - return conversationalService.retrieveCount(); - } - - public int runConversationCallingEndedConversationCallback() { - calls.append("runConversationCallingEndedConversationCallback,"); - conversationalService.initializeCountCallback(1); - conversationalService.endConversationCallback(); - return conversationalService.retrieveCountCallback(); - } - - public String runConversationCallingEndedConversationCheckConversationId() { - calls.append("runConversationCallingEndedConversationCheckConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation3"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversation(); - - if (serviceReference.getConversation() == null) { - return null; - } else { - return serviceReference.getConversation().getConversationID().toString(); - } - } - - public String runConversationCallingEndedConversationCallbackCheckConversationId() { - calls.append("runConversationCallingEndedConversationCallbackCheckConversationId,"); - ServiceReference serviceReference = - componentContext.getServiceReference(ConversationalService.class, "conversationalService"); - serviceReference.setConversationID("MyConversation3"); - - ConversationalService callableReference = serviceReference.getService(); - - callableReference.initializeCount(1); - callableReference.incrementCount(); - clientCount = callableReference.retrieveCount(); - callableReference.endConversationCallback(); - - if (serviceReference.getConversation() == null) { - return null; - } else { - return serviceReference.getConversation().getConversationID().toString(); - } - } - - public int runConversationAgeTimeout() { - calls.append("runConversationAgeTimeout,"); - // done in other testing - return clientCount; - } - - public int runConversationIdleTimeout() { - calls.append("runConversationIdleTimeout,"); - // done in other testing - return clientCount; - } - - public int runConversationPrincipleError() { - calls.append("runConversationPrincipleError,"); - // TODO - when policy framework is done - return clientCount; - } - - // From ConversationalCallback - @Init - public void init() { - calls.append("init,"); - - } - - @Destroy - public void destroy() { - calls.append("destroy,"); - - } - - public void initializeCount(int count) { - calls.append("initializeCount,"); - callbackCount = 0; - } - - public void incrementCount() { - calls.append("incrementCount,"); - callbackCount++; - } - - public int retrieveCount() { - calls.append("retrieveCount,"); - return callbackCount; - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public String endConversation() { - calls.append("endConversation,"); - callbackCount = 0; - return null; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java deleted file mode 100644 index 134ffda75d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.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.itest.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient; -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.CallableReference; -import org.oasisopen.sca.annotation.Service; - -/** - * A client component that accepts a reference to an ongoing conversation - * and takes part in that conversation - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ - -@Service(interfaces = {ConversationalReferenceClient.class}) -public class ConversationalReferenceClientImpl implements ConversationalReferenceClient { - - public void incrementCount(CallableReference conversationalService) { - ConversationalService callableReference = conversationalService.getService(); - - callableReference.incrementCount(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceRequestImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceRequestImpl.java deleted file mode 100644 index 73a6d7d27e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceRequestImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational.impl; - -import java.util.HashMap; - -import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * The service used when testing stateful conversations - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Service(ConversationalService.class) -@Scope("REQUEST") -public class ConversationalServiceRequestImpl implements ConversationalService { - - @ConversationID - protected String conversationId; - - @Callback - protected ConversationalCallback conversationalCallback; - - // static area in which to hold conversational data - private static HashMap conversationalState = new HashMap(); - - // a static member variable that records the number of times this service is called - public static StringBuffer calls = new StringBuffer(); - - @Init - public void init() { - calls.append("init,"); - } - - @Destroy - public void destroy() { - calls.append("destroy,"); - } - - public void initializeCount(int count) { - calls.append("initializeCount,"); - Integer conversationalCount = Integer.valueOf(count); - conversationalState.put(conversationId, conversationalCount); - } - - public void incrementCount() { - calls.append("incrementCount,"); - Integer conversationalCount = conversationalState.get(conversationId); - conversationalCount++; - conversationalState.put(conversationId, conversationalCount); - } - - public int retrieveCount() { - calls.append("retrieveCount,"); - Integer count = conversationalState.get(conversationId); - if (count != null) { - return count.intValue(); - } else { - return -999; - } - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public void initializeCountCallback(int count) { - calls.append("initializeCountCallback,"); - initializeCount(count); - conversationalCallback.initializeCount(count); - } - - public void incrementCountCallback() { - calls.append("incrementCountCallback,"); - incrementCount(); - conversationalCallback.incrementCount(); - } - - public int retrieveCountCallback() { - calls.append("retrieveCountCallback,"); - return conversationalCallback.retrieveCount(); - } - - public void businessExceptionCallback() throws Exception { - calls.append("businessExceptionCallback,"); - conversationalCallback.businessException(); - } - - public String endConversation() { - calls.append("endConversation,"); - conversationalState.remove(conversationId); - return conversationId; - } - - public String endConversationCallback() { - calls.append("endConversationCallback,"); - return conversationalCallback.endConversation(); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java deleted file mode 100644 index 5bafa5e075..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.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.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.ConversationAttributes; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * The service used when testing stateful conversations - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Service(ConversationalService.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge = "10 minutes", maxIdleTime = "5 minutes", singlePrincipal = false) -public class ConversationalServiceStatefulImpl implements ConversationalService { - - @ConversationID - protected String conversationId; - - @Callback - protected ConversationalCallback conversationalCallback; - - // local count - accumulates during the conversation - private int count = 0; - - // a static member variable that records the number of times this service is called - public static StringBuffer calls = new StringBuffer(); - - @Init - public void init() { - calls.append("init,"); - } - - @Destroy - public void destroy() { - calls.append("destroy,"); - } - - public void initializeCount(int count) { - calls.append("initializeCount,"); - this.count = count; - } - - public void incrementCount() { - calls.append("incrementCount,"); - count++; - } - - public int retrieveCount() { - calls.append("retrieveCount,"); - return count; - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public void initializeCountCallback(int count) { - calls.append("initializeCountCallback,"); - this.count = count; - conversationalCallback.initializeCount(count); - } - - public void incrementCountCallback() { - calls.append("incrementCountCallback,"); - count++; - conversationalCallback.incrementCount(); - } - - public int retrieveCountCallback() { - calls.append("retrieveCountCallback,"); - return conversationalCallback.retrieveCount(); - } - - public void businessExceptionCallback() throws Exception { - calls.append("businessExceptionCallback,"); - conversationalCallback.businessException(); - } - - public String endConversation() { - calls.append("endConversation,"); - count = 0; - return conversationId; - } - - public String endConversationCallback() { - calls.append("endConversationCallback,"); - return conversationalCallback.endConversation(); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulNonConversationalCallbackImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulNonConversationalCallbackImpl.java deleted file mode 100644 index 8d63ebbbef..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulNonConversationalCallbackImpl.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.itest.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.ConversationalServiceNonConversationalCallback; -import org.apache.tuscany.sca.itest.conversational.NonConversationalCallback; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.ConversationAttributes; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * The service used when testing stateful conversations - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Service(ConversationalServiceNonConversationalCallback.class) -@Scope("CONVERSATION") -@ConversationAttributes(maxAge = "10 minutes", maxIdleTime = "5 minutes", singlePrincipal = false) -public class ConversationalServiceStatefulNonConversationalCallbackImpl implements - ConversationalServiceNonConversationalCallback { - - @ConversationID - protected String conversationId; - - @Callback - protected NonConversationalCallback nonConversationalCallback; - - // local count - accumulates during the conversation - private int count = 0; - - // a static member variable that records the number of times this service is called - public static StringBuffer calls = new StringBuffer(); - - @Init - public void init() { - calls.append("init,"); - } - - @Destroy - public void destroy() { - calls.append("destroy,"); - } - - public void initializeCount(int count) { - calls.append("initializeCount,"); - this.count = count; - } - - public void incrementCount() { - calls.append("incrementCount,"); - count++; - } - - public int retrieveCount() { - calls.append("retrieveCount,"); - return count; - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public void initializeCountCallback(int count) { - calls.append("initializeCountCallback,"); - this.count = count; - nonConversationalCallback.initializeCount(count); - } - - public void incrementCountCallback() { - calls.append("incrementCountCallback,"); - count++; - nonConversationalCallback.incrementCount(); - } - - public int retrieveCountCallback() { - calls.append("retrieveCountCallback,"); - return nonConversationalCallback.retrieveCount(); - } - - public void businessExceptionCallback() throws Exception { - calls.append("businessExceptionCallback,"); - nonConversationalCallback.businessException(); - } - - public String endConversation() { - calls.append("endConversation,"); - count = 0; - return conversationId; - } - - public String endConversationCallback() { - calls.append("endConversationCallback,"); - return nonConversationalCallback.endConversation(); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java deleted file mode 100644 index ecf108c656..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational.impl; - -import java.util.HashMap; - -import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * The service used when testing stateful conversations - * - * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ - */ -@Service(ConversationalService.class) -@Scope("STATELESS") -public class ConversationalServiceStatelessImpl implements ConversationalService { - - @ConversationID - protected String conversationId; - - @Callback - protected ConversationalCallback conversationalCallback; - - // static area in which to hold conversational data - private static HashMap conversationalState = new HashMap(); - - // a static member variable that records the number of times this service is called - public static StringBuffer calls = new StringBuffer(); - - @Init - public void init() { - calls.append("init,"); - } - - @Destroy - public void destroy() { - calls.append("destroy,"); - } - - public void initializeCount(int count) { - calls.append("initializeCount,"); - Integer conversationalCount = Integer.valueOf(count); - conversationalState.put(conversationId, conversationalCount); - } - - public void incrementCount() { - calls.append("incrementCount,"); - Integer conversationalCount = conversationalState.get(conversationId); - conversationalCount++; - conversationalState.put(conversationId, conversationalCount); - } - - public int retrieveCount() { - calls.append("retrieveCount,"); - Integer count = conversationalState.get(conversationId); - if (count != null) { - return count.intValue(); - } else { - return -999; - } - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public void initializeCountCallback(int count) { - calls.append("initializeCountCallback,"); - initializeCount(count); - conversationalCallback.initializeCount(count); - } - - public void incrementCountCallback() { - calls.append("incrementCountCallback,"); - incrementCount(); - conversationalCallback.incrementCount(); - } - - public int retrieveCountCallback() { - calls.append("retrieveCountCallback,"); - return conversationalCallback.retrieveCount(); - } - - public void businessExceptionCallback() throws Exception { - calls.append("businessExceptionCallback,"); - conversationalCallback.businessException(); - } - - public String endConversation() { - calls.append("endConversation,"); - conversationalState.remove(conversationId); - return conversationId; - } - - public String endConversationCallback() { - calls.append("endConversationCallback,"); - return conversationalCallback.endConversation(); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScopeImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScopeImpl.java deleted file mode 100644 index ee09e99f1b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScopeImpl.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.itest.conversational.impl; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.tuscany.sca.itest.conversational.ConversationalService; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Service; - -@Service(ConversationalService.class) -public class ConversationalServiceStatelessScopeImpl implements ConversationalService { - - @ConversationID - protected String cid; - - static Map state = new HashMap(); - - public void destroy() { - // TODO Auto-generated method stub - - } - - public String endConversation() { - state.remove(cid); - return cid; - } - - public String endConversationCallback() { - // TODO Auto-generated method stub - return null; - - } - - public void incrementCount() { - state.put(cid, Integer.valueOf(state.get(cid) + 1)); - } - - public void businessException() throws Exception { - throw new Exception("Business Exception"); - } - - public void incrementCountCallback() { - // TODO Auto-generated method stub - - } - - public void init() { - // TODO Auto-generated method stub - - } - - public void initializeCount(int count) { - state.put(cid, Integer.valueOf(count)); - } - - public void initializeCountCallback(int count) { - // TODO Auto-generated method stub - - } - - public void businessExceptionCallback() throws Exception { - throw new Exception("Business Exception"); - } - - public int retrieveCount() { - return state.get(cid); - } - - public int retrieveCountCallback() { - // TODO Auto-generated method stub - return 0; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/DServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/DServiceImpl.java deleted file mode 100644 index ad0c1fb7da..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/DServiceImpl.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.itest.conversational.impl; - -import org.apache.tuscany.sca.itest.conversational.DService; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * Simple conversational Service - */ -@Service(DService.class) -@Scope("CONVERSATION") -public class DServiceImpl implements DService { - - /** - * The state for this service - */ - private String state = "Initial state value"; - - /** - * Returns the state for this service. - * - * @return The state for this service - */ - public String getState() { - return state; - } - - /** - * Sets the state for this service. - * - * @param aState The state for this service - */ - public void setState(String aState) { - this.state = aState; - } - - /** - * Sets the conversation ID for this service - * @param id The Conversation ID - */ - @ConversationID - public void setConversationID(String id) { - System.out.println("Setting conversation ID at service = " + id); - } - - public void endConversationViaAnnotatedMethod() { - System.out.println("Annotated Ends Conversation"); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/GammaImpl.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/GammaImpl.java deleted file mode 100644 index 55390189cf..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/GammaImpl.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 org.apache.tuscany.sca.itest.conversational.impl; - -import java.util.ArrayList; - -import org.apache.tuscany.sca.itest.Record; -import org.apache.tuscany.sca.itest.conversational.Gamma; -import org.oasisopen.sca.annotation.ConversationID; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -/** - * @version $Rev$ $Date$ - */ - -@Service(Gamma.class) -@Scope("CONVERSATION") -public class GammaImpl implements Gamma { - @ConversationID - public String conversationId; - - private ArrayList list; - - public void start(int param) { - list = new ArrayList(); - fillList(param, conversationId); - } - - public boolean hasNext() { - return !list.isEmpty(); - } - - public Record next() { - return list.remove(0); - } - - public void stop() { - list = null; - } - - private void fillList(int param, String cid) { - for (int i = 0; i < param; i++) { - Record record = new Record(); - record.id = "id_" + i; - record.conversationId = cid; - list.add(record); - } - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationAge.composite b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationAge.composite deleted file mode 100644 index 12746650c7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationAge.composite +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationUniqueId.composite b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationUniqueId.composite deleted file mode 100644 index 3fbffdc660..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/ConversationUniqueId.composite +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationId.composite b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationId.composite deleted file mode 100644 index 50ffdea701..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationId.composite +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationLifetime.composite b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationLifetime.composite deleted file mode 100644 index 538e2f63fd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversationLifetime.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversational.composite b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversational.composite deleted file mode 100644 index dba9cec03f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/main/resources/conversational.composite +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java deleted file mode 100644 index e64a9acbe2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.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.itest.conversational; - -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; - -public class ConversationIdTestCase { - - private Node node; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("conversationId.composite"); - node = NodeFactory.newInstance().createNode("conversationId.composite", new Contribution("c1", location)); - node.start(); - } - - @After - public void tearDown() throws Exception { - if (node != null) { - node.stop(); - } - } - - @Test - public void testConversationId() { - ConversationIdService service = node.getService(ConversationIdService.class, "ConversationIdComponent"); - Assert.assertNotNull(service.getCIDField()); - Assert.assertNotNull(service.getCIDSetter()); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationLifetimeTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationLifetimeTestCase.java deleted file mode 100644 index 2b1aea3ff3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationLifetimeTestCase.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational; - -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 ConversationLifetimeTestCase { - - private static Node node; - - @BeforeClass - public static void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("conversationLifetime.composite"); - node = NodeFactory.newInstance().createNode("conversationLifetime.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void tearDown() throws Exception { - if (node != null) { - node.stop(); - } - } - - /** - * Following a clarification re. the wording of the Java Common Annotations and APIs 1.00 Specification - * (see TUSCANY-2055) the following is accepted to be the intended operation - * - * Whether the conversation ID is chosen by the user or is generated by the system, the client - * may access the conversation ID by calling getConversationID() on the current conversation object. - * - * ServiceReference.getConversationID() - Returns the id supplied by the user that will be associated with - * future conversations initiated through this reference, or null if no ID has been set by the user. - * - * ServiceReference.setConversationID(Object conversationId) - Set an ID, supplied by the user, to associate with any future conversation - * started through this reference. If the value supplied is null then the id will be generated - * by the implementation. Throws an IllegalStateException if a conversation is currently - * associated with this reference. - * - */ - - /** - * Verify that ServiceReference.getConversationID() returns null before a conversation - * ID has been set manually. - */ - @Test - public void getConversationID() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.getState(); - Assert.assertNull(service.getConversationID()); - } - - /** - * Verify that ServiceReference.getConversationID() returns any value previous set through the - * setConversationID() API. - */ - @Test - public void getConversationID2() { - String userProvidedID = "A conversation ID"; - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.setConversationID(userProvidedID); - service.getState(); - Assert.assertEquals(service.getConversationID(), userProvidedID); - } - - /** - * Whether the conversation ID is chosen by the user or is generated by the system, the client - * may access the conversation ID by calling getConversationID() on the current conversation object. - * Here test the manually set conversationID - */ - @Test - public void getConversationID3() { - String userProvidedID = "A conversation ID 3"; - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.setConversationID(userProvidedID); - service.getState(); - Assert.assertEquals(service.getConversationObjectConversationId(), userProvidedID); - } - - /** - * Whether the conversation ID is chosen by the user or is generated by the system, the client - * may access the conversation ID by calling getConversationID() on the current conversation object. - * Here test the auto generated conversationId - */ - @Test - public void getConversationID4() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.getState(); - Assert.assertNotNull(service.getConversationObjectConversationId()); - } - - /** - * Java Common Annotations and APIs 1.00 Specification line 494-495 Verify: - * If a method is invoked on a service reference after an - * "@EndsConversation" method has been called then a new conversation will - * automatically be started. - */ - @Test - public void implicitStartNewConversationAfterEnd() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.getState(); - Object firstID = service.getConversationObjectConversationId(); - service.endConversationViaAnnotatedMethod(); - service.getState(); - Assert.assertNotSame(firstID, service.getConversationObjectConversationId()); - } - - /** - * Java Common Annotations and APIs 1.00 Specification line 495-495 Verify: If a - * method is invoked on a service reference after an "@EndsConversation" - * method has been called then a new conversation will automatically be - * started. Note: Uses Conversation.end() rather than "@EndsConversation" - */ - @Test - public void implicitStartNewConversationAfterEnd2() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.getState(); - Object firstID = service.getConversationObjectConversationId(); - service.endConversation(); - service.getState(); - Assert.assertNotSame(firstID, service.getConversationObjectConversationId()); - } - - /** - * Java Common Annotations and APIs 1.00 Specification line 495-497 Verify: - * If ServiceReference.getConversationID() is called after the - * "@EndsConversation" method is called, but before the next conversation - * has been started, it will return null. - */ - @Test - public void nullConversationIDAfterEndConversation() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.getState(); - service.endConversationViaAnnotatedMethod(); - Assert.assertNull(service.getConversationObjectConversationId()); - } - - /** - * Java Common Annotations and APIs 1.00 Specification line 495-497 Verify: - * If ServiceReference.getConversationID() is called after the - * "@EndsConversation" method is called, but before the next conversation - * has been started, it will return null. Note: Uses explicit set of Conversation ID - */ - @Test - public void nullConversationIDAfterEndConversation1a() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.setConversationID("User provided ID"); - service.getState(); - service.endConversationViaAnnotatedMethod(); - Assert.assertNull(service.getConversationObjectConversationId()); - } - - /** - * Java Common Annotations and APIs 1.00 Specification line 495-497 Verify: If - * ServiceReference.getConversationID() is called after the - * "@EndsConversationmethod" is called, but before the next conversation has - * been started, it will return null. Note: Uses Conversation.end() rather - * than "@EndsConversation" - */ - @Test - public void nullConversationIDAfterEndConversation2() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.getState(); - service.endConversation(); - Assert.assertNull(service.getConversationObjectConversationId()); - } - - /** - * Java Common Annotations and APIs 1.00 Specification line 495-497 Verify: If - * ServiceReference.getConversationID() is called after the - * "@EndsConversationmethod" is called, but before the next conversation has - * been started, it will return null. Note: Uses Conversation.end() rather - * than "@EndsConversation". Note 2: Uses explicit set of Conversation ID - */ - @Test - public void nullConversationIDAfterEndConversation2a() { - CService service = node.getService(CService.class, "ConversationalCComponent"); - service.setConversationID("User provided ID"); - service.getState(); - service.endConversation(); - Assert.assertNull(service.getConversationObjectConversationId()); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationUniqueIdTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationUniqueIdTestCase.java deleted file mode 100644 index f9bb69aa30..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationUniqueIdTestCase.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.conversational; - -import org.apache.tuscany.sca.itest.TestResult; -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.Ignore; -import org.junit.Test; - -/** - * @version $Rev$ $Date$ - */ -public class ConversationUniqueIdTestCase { - - private Node node; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("ConversationUniqueId.composite"); - node = NodeFactory.newInstance().createNode("ConversationUniqueId.composite", new Contribution("c1", location)); - node.start(); - } - - @After - public void tearDown() throws Exception { - if (node != null) { - node.stop(); - } - } - - @Ignore("I'm seeing NPE in GammaImpl.hasNext()") - @Test - public void testConversationUniqueId() { - Alpha alpha = node.getService(Alpha.class, "Alpha"); - int numConversations = 3; - - for (int i = 0; i < numConversations; ++i) { - alpha.run(5); - } - - // Wait for the conversations to complete - while (TestResult.getCompleted() < numConversations) { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - } - } - - Assert.assertEquals(TestResult.results.size(), numConversations); - for (Boolean value : TestResult.results.values()) { - Assert.assertTrue(value); - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java deleted file mode 100644 index a686754d3a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational; - -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.ConversationEndedException; - -public class ConversationalAgeTestCase { - - private static Node node; - - @BeforeClass - public static void setUp() throws Exception { - System.setProperty("org.apache.tuscany.sca.core.conversation.ConversationManager.ReaperInterval", "2"); - String location = ContributionLocationHelper.getContributionLocation("ConversationAge.composite"); - node = NodeFactory.newInstance().createNode("ConversationAge.composite", new Contribution("c1", location)); - node.start(); - } - - @AfterClass - public static void tearDown() throws Exception { - System.clearProperty("org.apache.tuscany.sca.core.conversation.ConversationManager.ReaperInterval"); - if (node != null) { - node.stop(); - } - } - - @Test - public void testMaxAge() throws InterruptedException { - - ConversationalService conversationalService = - node.getService(ConversationalService.class, "ConversationAgeComponent"); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - conversationalService.initializeCount(42); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Thread.sleep(500); - try { - Assert.assertEquals(42, conversationalService.retrieveCount()); - } catch (ConversationEndedException e) { - Assert.fail(); - } - } - - @Test - public void testAgeExpired() throws InterruptedException { - - ConversationalService conversationalService = - node.getService(ConversationalService.class, "ConversationAgeComponent"); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - conversationalService.initializeCount(42); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Thread.sleep(1100); - try { - Assert.assertEquals(0, conversationalService.retrieveCount()); - Assert.fail(); - } catch (ConversationEndedException e) { - // expected - } - } - - @Test - public void testMaxIdle() throws InterruptedException { - - ConversationalService conversationalService = - node.getService(ConversationalService.class, "ConversationIdleComponent"); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - conversationalService.initializeCount(42); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Assert.assertEquals(42, conversationalService.retrieveCount()); - Thread.sleep(1100); - try { - Assert.assertEquals(0, conversationalService.retrieveCount()); - } catch (ConversationEndedException e) { - // expected - } - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java deleted file mode 100644 index ee1bf84fc4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.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.conversational; - -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; - -public class ConversationalJ2SETestCase { - - private Node node; - - @Before - public void setUp() throws Exception { - String location = ContributionLocationHelper.getContributionLocation("conversational.composite"); - node = NodeFactory.newInstance().createNode("conversational.composite", new Contribution("c1", location)); - node.start(); - } - - @After - public void tearDown() throws Exception { - if (node != null) { - node.stop(); - } - } - - @Test - public void testStatefulConversation() { - ConversationalService conversationalService = - node.getService(ConversationalService.class, "ConversationalServiceStateful"); - - conversationalService.initializeCount(1); - Assert.assertEquals(1, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(2, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - Assert.assertEquals(0, conversationalService.retrieveCount()); - - conversationalService.initializeCount(4); - Assert.assertEquals(4, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(5, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - } - - @Test - public void testStatelessConversation() { - ConversationalService conversationalService = - node.getService(ConversationalService.class, "ConversationalServiceStateless"); - - conversationalService.initializeCount(1); - Assert.assertEquals(1, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(2, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - conversationalService.initializeCount(4); - Assert.assertEquals(4, conversationalService.retrieveCount()); - conversationalService.incrementCount(); - Assert.assertEquals(5, conversationalService.retrieveCount()); - conversationalService.endConversation(); - - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java deleted file mode 100644 index 56bca7ac78..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java +++ /dev/null @@ -1,702 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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.conversational; - -import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatefulImpl; -import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatefulNonConversationalCallbackImpl; -import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl; -import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceRequestImpl; -import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl; -import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulNonConversationalCallbackImpl; -import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl; -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 ConversationalTestCase { - - private static Node node; - private static ConversationalClient conversationalStatelessClientStatelessService; - private static ConversationalClient conversationalStatelessClientStatefulService; - private static ConversationalClient conversationalStatefulClientStatelessService; - private static ConversationalClient conversationalStatefulClientStatefulService; - private static ConversationalClient conversationalStatelessClientRequestService; - private static ConversationalClient conversationalStatefulClientNonConversationalCallbackStatelessService; - - @BeforeClass - public static void setUp() throws Exception { - try { - String location = ContributionLocationHelper.getContributionLocation("conversational.composite"); - node = NodeFactory.newInstance().createNode("conversational.composite", new Contribution("c1", location)); - node.start(); - - conversationalStatelessClientStatelessService = - node.getService(ConversationalClient.class, "ConversationalStatelessClientStatelessService"); - - conversationalStatelessClientStatefulService = - node.getService(ConversationalClient.class, "ConversationalStatelessClientStatefulService"); - - conversationalStatefulClientStatelessService = - node.getService(ConversationalClient.class, "ConversationalStatefulClientStatelessService"); - - conversationalStatefulClientStatefulService = - node.getService(ConversationalClient.class, "ConversationalStatefulClientStatefulService"); - conversationalStatelessClientRequestService = - node.getService(ConversationalClient.class, "ConversationalStatelessClientRequestService"); - conversationalStatefulClientNonConversationalCallbackStatelessService = - node.getService(ConversationalClient.class, - "ConversationalStatefulClientNonConversationalCallbackStatefulService"); - - } catch (Exception ex) { - System.err.println(ex.toString()); - } - - } - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - private void resetCallStack() { - - // reset the place where we record the sequence of calls passing - // through each component instance - ConversationalServiceStatelessImpl.calls = new StringBuffer(); - ConversationalServiceStatefulImpl.calls = new StringBuffer(); - ConversationalClientStatelessImpl.calls = new StringBuffer(); - ConversationalClientStatefulImpl.calls = new StringBuffer(); - ConversationalClientStatefulNonConversationalCallbackImpl.calls = new StringBuffer(); - ConversationalServiceStatefulNonConversationalCallbackImpl.calls = new StringBuffer(); - - } - - // stateless client stateful service tests - // ======================================= - @Test - public void testStatelessStatefulConversationFromInjectedReference() { - int count = conversationalStatelessClientStatefulService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatefulConversationFromInjectedReference2() { - int count = conversationalStatelessClientStatefulService.runConversationFromInjectedReference2(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatefulConversationFromServiceReference() { - int count = conversationalStatelessClientStatefulService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatefulConversationWithUserDefinedConversationId() { - int count = conversationalStatelessClientStatefulService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatefulConversationCheckUserDefinedConversationId() { - String conversationId = - conversationalStatelessClientStatefulService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatelessStatefulConversationCheckingScope() { - resetCallStack(); - conversationalStatelessClientStatefulService.runConversationCheckingScope(); - Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", - ConversationalServiceStatefulImpl.calls.toString()); - } - - @Test - public void testStatelessStatefulConversationWithCallback() { - resetCallStack(); - int count = conversationalStatelessClientStatefulService.runConversationWithCallback(); - Assert.assertEquals(0, count); - - Assert - .assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,", - ConversationalClientStatelessImpl.calls.toString()); - } - - //@Test - public void testStatelessStatefulConversationHavingPassedReference() { - int count = conversationalStatelessClientStatefulService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatelessStatefulConversationBusinessException() { - String message = conversationalStatelessClientStatefulService.runConversationBusinessException(); - Assert.assertEquals("Business Exception", message); - } - - @Test - public void testStatelessStatefulConversationBusinessExceptionCallback() { - String message = conversationalStatelessClientStatefulService.runConversationBusinessExceptionCallback(); - Assert.assertEquals("Business Exception", message); - } - - @Test - public void testStatelessStatefulConversationCallingEndedConversation() { - int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversation(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatelessStatefulConversationCallingEndedConversationCallback() { - int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatelessStatefulConversationCallingEndedConversationCheckConversationId() { - String id = - conversationalStatelessClientStatefulService.runConversationCallingEndedConversationCheckConversationId(); - Assert.assertEquals(null, id); - } - - //@Test - public void testStatelessStatefulConversationCallingEndedConversationCallbackCheckConversationId() { - String id = - conversationalStatelessClientStatefulService - .runConversationCallingEndedConversationCallbackCheckConversationId(); - Assert.assertEquals(null, id); - } - - // stateless client stateless service tests - // ======================================== - @Test - public void testStatelessStatelessConversationFromInjectedReference() { - int count = conversationalStatelessClientStatelessService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatelessConversationFromInjectedReference2() { - int count = conversationalStatelessClientStatelessService.runConversationFromInjectedReference2(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatelessConversationFromServiceReference() { - int count = conversationalStatelessClientStatelessService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatelessConversationWithUserDefinedConversationId() { - int count = conversationalStatelessClientStatelessService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessStatelessConversationCheckUserDefinedConversationId() { - String conversationId = - conversationalStatelessClientStatelessService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatelessStatelessConversationCheckingScope() { - resetCallStack(); - conversationalStatelessClientStatelessService.runConversationCheckingScope(); - Assert - .assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,", - ConversationalServiceStatelessImpl.calls.toString()); - } - - @Test - public void testStatelessStatelessConversationWithCallback() { - resetCallStack(); - int count = conversationalStatelessClientStatelessService.runConversationWithCallback(); - Assert.assertEquals(0, count); - - Assert - .assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,", - ConversationalClientStatelessImpl.calls.toString()); - } - - //@Test - public void testStatelessStatelessConversationHavingPassedReference() { - int count = conversationalStatelessClientStatelessService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatelessStatelessConversationCallingEndedConversation() { - int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversation(); - Assert.assertEquals(-999, count); - } - - @Test - public void testStatelessStatelessConversationCallingEndedConversationCallback() { - int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatelessStatelessConversationCallingEndedConversationCheckConversationId() { - String id = - conversationalStatelessClientStatelessService.runConversationCallingEndedConversationCheckConversationId(); - Assert.assertEquals(null, id); - } - - //@Test - public void testStatelessStatelessConversationCallingEndedConversationCallbackCheckConversationId() { - String id = - conversationalStatelessClientStatelessService - .runConversationCallingEndedConversationCallbackCheckConversationId(); - Assert.assertEquals(null, id); - } - - // stateful client stateful service tests - // ====================================== - @Test - public void testStatefulStatefulConversationFromInjectedReference() { - int count = conversationalStatefulClientStatefulService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatefulConversationFromInjectedReference2() { - int count = conversationalStatefulClientStatefulService.runConversationFromInjectedReference2(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatefulConversationFromServiceReference() { - int count = conversationalStatefulClientStatefulService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatefulConversationWithUserDefinedConversationId() { - int count = conversationalStatefulClientStatefulService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatefulConversationCheckUserDefinedConversationId() { - String conversationId = - conversationalStatefulClientStatefulService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatefulStatefulConversationCheckingScope() { - resetCallStack(); - conversationalStatefulClientStatefulService.runConversationCheckingScope(); - Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", - ConversationalServiceStatefulImpl.calls.toString()); - } - - @Test - public void testStatefulStatefulConversationWithCallback() { - resetCallStack(); - int count = conversationalStatefulClientStatefulService.runConversationWithCallback(); - Assert.assertEquals(4, count); - - Assert - .assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", - ConversationalClientStatefulImpl.calls.toString()); - } - - //@Test - public void testStatefulStatefulConversationHavingPassedReference() { - int count = conversationalStatefulClientStatefulService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatefulStatefulConversationCallingEndedConversation() { - int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversation(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatefulStatefulConversationCallingEndedConversationCallback() { - int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatefulStatefulConversationCallingEndedConversationCheckConversationId() { - String id = - conversationalStatefulClientStatefulService.runConversationCallingEndedConversationCheckConversationId(); - Assert.assertEquals(null, id); - } - - @Test - public void testStatefulStatefulConversationCallingEndedConversationCallbackCheckConversationId() { - String id = - conversationalStatefulClientStatefulService - .runConversationCallingEndedConversationCallbackCheckConversationId(); - Assert.assertEquals(null, id); - } - - // stateful client stateless service tests - // ======================================= - @Test - public void testStatefulStatelessConversationFromInjectedReference() { - int count = conversationalStatefulClientStatelessService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatelessConversationFromInjectedReference2() { - int count = conversationalStatefulClientStatelessService.runConversationFromInjectedReference2(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatelessConversationFromServiceReference() { - int count = conversationalStatefulClientStatelessService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatelessConversationWithUserDefinedConversationId() { - int count = conversationalStatefulClientStatelessService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulStatelessConversationCheckUserDefinedConversationId() { - String conversationId = - conversationalStatefulClientStatelessService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatefulStatelessConversationCheckingScope() { - resetCallStack(); - conversationalStatefulClientStatelessService.runConversationCheckingScope(); - Assert - .assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,", - ConversationalServiceStatelessImpl.calls.toString()); - } - - @Test - public void testStatefulStatelessConversationWithCallback() { - resetCallStack(); - int count = conversationalStatefulClientStatelessService.runConversationWithCallback(); - Assert.assertEquals(4, count); - - Assert - .assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", - ConversationalClientStatefulImpl.calls.toString()); - } - - //@Test - public void testStatefulStatelessConversationHavingPassedReference() { - int count = conversationalStatefulClientStatelessService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatefulStatelessConversationCallingEndedConversation() { - int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversation(); - Assert.assertEquals(-999, count); - } - - @Test - public void testStatefulStatelessConversationCallingEndedConversationCallback() { - int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatefulStatelessConversationCallingEndedConversationCheckConversationId() { - String id = - conversationalStatefulClientStatelessService.runConversationCallingEndedConversationCheckConversationId(); - Assert.assertEquals(null, id); - } - - @Test - public void testStatefulStatelessConversationCallingEndedConversationCallbackCheckConversationId() { - String id = - conversationalStatefulClientStatelessService - .runConversationCallingEndedConversationCallbackCheckConversationId(); - Assert.assertEquals(null, id); - } - - // stateless client request scope service tests - // ============================================ - @Test - public void testStatelessRequestConversationFromInjectedReference() { - int count = conversationalStatelessClientRequestService.runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessRequestConversationFromInjectedReference2() { - int count = conversationalStatelessClientRequestService.runConversationFromInjectedReference2(); - Assert.assertEquals(1, count); - } - - @Test - public void testStatelessRequestConversationFromServiceReference() { - int count = conversationalStatelessClientRequestService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatelessRequestConversationWithUserDefinedConversationId() { - int count = conversationalStatelessClientRequestService.runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - //@Test - public void testStatelessRequestConversationCheckUserDefinedConversationId() { - String conversationId = - conversationalStatelessClientRequestService.runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatelessRequestConversationCheckingScope() { - resetCallStack(); - ConversationalServiceRequestImpl.calls = new StringBuffer(); - conversationalStatelessClientRequestService.runConversationCheckingScope(); - Assert.assertEquals("initializeCount,incrementCount,retrieveCount,endConversation,", - ConversationalServiceRequestImpl.calls.toString()); - } - - @Test - public void testStatelessRequestConversationWithCallback() { - resetCallStack(); - ConversationalClientStatelessImpl.calls = new StringBuffer(); - int count = conversationalStatelessClientRequestService.runConversationWithCallback(); - Assert.assertEquals(0, count); - - Assert - .assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,", - ConversationalClientStatelessImpl.calls.toString()); - } - - //@Test - public void testStatelessRequestConversationHavingPassedReference() { - int count = conversationalStatelessClientRequestService.runConversationHavingPassedReference(); - Assert.assertEquals(3, count); - } - - @Test - public void testStatelessRequestConversationBusinessException() { - String message = conversationalStatelessClientRequestService.runConversationBusinessException(); - Assert.assertEquals("Business Exception", message); - } - - @Test - public void testStatelessRequestConversationBusinessExceptionCallback() { - String message = conversationalStatelessClientRequestService.runConversationBusinessExceptionCallback(); - Assert.assertEquals("Business Exception", message); - } - - @Test - public void testStatelessRequestConversationCallingEndedConversation() { - int count = conversationalStatelessClientRequestService.runConversationCallingEndedConversation(); - Assert.assertEquals(-999, count); - } - - @Test - public void testStatelessRequestConversationCallingEndedConversationCallback() { - int count = conversationalStatelessClientRequestService.runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatelessRequestConversationCallingEndedConversationCheckConversationId() { - String id = - conversationalStatelessClientRequestService.runConversationCallingEndedConversationCheckConversationId(); - Assert.assertEquals(null, id); - } - - //@Test - public void testStatelessRequestConversationCallingEndedConversationCallbackCheckConversationId() { - String id = - conversationalStatelessClientRequestService - .runConversationCallingEndedConversationCallbackCheckConversationId(); - Assert.assertEquals(null, id); - } - - // stateful client non conversational callback stateful service tests - // ================================================================== - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationFromInjectedReference() { - int count = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationFromInjectedReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationFromInjectedReference2() { - int count = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationFromInjectedReference2(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationFromServiceReference() { - int count = - conversationalStatefulClientNonConversationalCallbackStatelessService.runConversationFromServiceReference(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationWithUserDefinedConversationId() { - int count = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationWithUserDefinedConversationId(); - Assert.assertEquals(2, count); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationCheckUserDefinedConversationId() { - String conversationId = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationCheckUserDefinedConversationId(); - Assert.assertEquals("MyConversation2", conversationId); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationCheckingScope() { - resetCallStack(); - conversationalStatefulClientNonConversationalCallbackStatelessService.runConversationCheckingScope(); - Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", - ConversationalServiceStatefulNonConversationalCallbackImpl.calls.toString()); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationWithCallback() { - resetCallStack(); - int count = conversationalStatefulClientNonConversationalCallbackStatelessService.runConversationWithCallback(); - Assert.assertEquals(0, count); - - Assert - .assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,", - ConversationalClientStatefulNonConversationalCallbackImpl.calls.toString()); - } - - //@Test - public void testStatefulNonConversationalCallbackStatefulConversationHavingPassedReference() { - int count = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationHavingPassedReference(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationCallingEndedConversation() { - int count = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationCallingEndedConversation(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationCallingEndedConversationCallback() { - int count = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationCallingEndedConversationCallback(); - Assert.assertEquals(0, count); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationCallingEndedConversationCheckConversationId() { - String id = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationCallingEndedConversationCheckConversationId(); - Assert.assertEquals(null, id); - } - - @Test - public void testStatefulNonConversationalCallbackStatefulConversationCallingEndedConversationCallbackCheckConversationId() { - String id = - conversationalStatefulClientNonConversationalCallbackStatelessService - .runConversationCallingEndedConversationCallbackCheckConversationId(); - Assert.assertEquals("MyConversation3", id); - } - - private static final String NEW_A_VALUE = "First Instance - TestCode Set state on A"; - private static final String NEW_B_VALUE = "First Instance - TestCode Set state on B"; - private static final String SECOND_NEW_A_VALUE = "Second Instance - TestCode Set state on A"; - private static final String SECOND_NEW_B_VALUE = "Second Instance - TestCode Set state on B"; - - @Test - public void testMultipleConversations() { - ////////// - // Tests on first instance - ////////// - System.out.println("========= First instance tests ========="); - AService aService = node.getService(AService.class, "ConversationalAComponent"); - - // Make sure initial values are correct - Assert.assertEquals(Constants.A_INITIAL_VALUE, aService.getState()); - Assert.assertEquals(Constants.B_INITIAL_VALUE, aService.getStateOnB()); - - // Set some new values - aService.setState(NEW_A_VALUE); - aService.setStateOnB(NEW_B_VALUE); - - // Verify the set worked - Assert.assertEquals(NEW_A_VALUE, aService.getState()); - Assert.assertEquals(NEW_B_VALUE, aService.getStateOnB()); - - ////////// - // Tests on second instance - ////////// - System.out.println("========= Second instance tests ========="); - - // Do another look up - AService aService2 = node.getService(AService.class, "ConversationalAComponent"); - - // Make sure initial values are correct on the second instance - Assert.assertEquals(Constants.A_INITIAL_VALUE, aService2.getState()); - Assert.assertEquals(Constants.B_INITIAL_VALUE, aService2.getStateOnB()); - - // Set some new values on the second instance - aService2.setState(SECOND_NEW_A_VALUE); - aService2.setStateOnB(SECOND_NEW_B_VALUE); - - // Verify the set worked on the second instance - Assert.assertEquals(SECOND_NEW_A_VALUE, aService2.getState()); - Assert.assertEquals(SECOND_NEW_B_VALUE, aService2.getStateOnB()); - - // Verify the values have not been changed on the first instance - Assert.assertEquals(NEW_A_VALUE, aService.getState()); - Assert.assertEquals(NEW_B_VALUE, aService.getStateOnB()); - - System.out.println("========= Done instance tests ========="); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/build.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/build.xml deleted file mode 100644 index 7542fc23dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/build.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/pom.xml deleted file mode 100644 index 9fa5f913ff..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/bin-distro-unzip/pom.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../pom.xml - - itest-bin-distro-unzip - Apache Tuscany SCA iTest Bin Distro Unzip - - - - org.apache.tuscany.sca - tuscany-distribution-all - pom - 2.0-M3 - - - - - - - - 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/tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/build.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/build.xml deleted file mode 100644 index f222a3ac0c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ${java.home} - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/pom.xml deleted file mode 100644 index e40d5541fb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/binding-ws-calculator/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../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-M3 - - - - - - - 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/tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/build.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/build.xml deleted file mode 100644 index ac3bcf05d3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/build.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/pom.xml deleted file mode 100644 index 1959cd4333..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/calculator-rmi/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../pom.xml - - itest-distribution-calculator-rmi - Apache Tuscany SCA iTest Distribution calculator-rmi - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M3 - - - - - - - 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/tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/build.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/build.xml deleted file mode 100644 index 3ac1900c3f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/build.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ${java.home} - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/pom.xml deleted file mode 100644 index a34796400c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/implementation-java-calculator/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../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-M3 - - - - - - - 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/tags/java/sca/2.0-M3-RC5/itest/distribution/legal-checks/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/legal-checks/pom.xml deleted file mode 100644 index f3b4356710..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/legal-checks/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../pom.xml - - itest-distribution-legal-checks - Apache Tuscany SCA iTest Distribution Legal Checks - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M3 - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java b/tags/java/sca/2.0-M3-RC5/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java deleted file mode 100644 index d17fb283a9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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 not 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/tags/java/sca/2.0-M3-RC5/itest/distribution/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/pom.xml deleted file mode 100644 index 91b0875b45..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../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-jsp - webapp-helloworld-stripes - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-bpel/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-bpel/pom.xml deleted file mode 100644 index 0ea66bcde0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-bpel/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../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-M3 - - - - org.apache.tuscany.sca - helloworld-bpel - war - 2.0-M3 - - - - 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/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-bpel/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 5305695987..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-jsp/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-jsp/pom.xml deleted file mode 100644 index a373eec844..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-jsp/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../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-M3 - - - - org.apache.tuscany.sca - sample-helloworld-jsp - war - 2.0-M3 - - - - 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-jsp - - - - org.apache.tuscany.sca - sample-helloworld-jsp - war - - helloworld-jsp - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-jsp/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 7bcd590cf0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-stripes/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-stripes/pom.xml deleted file mode 100644 index 1d884241c0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-stripes/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../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-M3 - - - - org.apache.tuscany.sca - sample-helloworld-stripes - war - 2.0-M3 - - - - 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 - sample-helloworld-stripes - war - - helloworld-stripes - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld-stripes/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 4c75e312b5..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld/pom.xml deleted file mode 100644 index 8c1fe33383..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/distribution/webapp-helloworld/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - itest-distribution - 2.0-M3 - ../pom.xml - - itest-distribution-webapp-helloworld - Apache Tuscany SCA iTest Distribution Webapp helloworld - - - - - org.apache.tuscany.sca - itest-bin-distro-unzip - pom - 2.0-M3 - - - - org.apache.tuscany.sca - sample-helloworld - war - 2.0-M3 - - - - 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 - sample-helloworld - war - http://localhost:8085/helloworld - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/exceptions/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/exceptions/pom.xml deleted file mode 100644 index 3fd1855672..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/exceptions/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-exceptions - Apache Tuscany SCA iTest Exceptions - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java deleted file mode 100644 index 1f57116bac..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java deleted file mode 100644 index 112aefc747..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java deleted file mode 100644 index 53a6c70b57..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java deleted file mode 100644 index ace219991b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java deleted file mode 100644 index 453528444d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java deleted file mode 100644 index 26b9f0a383..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java deleted file mode 100644 index cd62338841..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java deleted file mode 100644 index 56b9fc6f5b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java deleted file mode 100644 index c5b54ff902..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/resources/ExceptionTest.composite b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/resources/ExceptionTest.composite deleted file mode 100644 index d42866303e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/main/resources/ExceptionTest.composite +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java deleted file mode 100644 index 7794348476..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/pom.xml deleted file mode 100644 index d277051514..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-implementation-spring - Apache Tuscany SCA iTest Spring Implementation - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 2.0-M3 - - - org.apache.tuscany.sca - tuscany-implementation-spring-sca - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 2.0-M3 - - - - - org.springframework - spring-core - 2.5.5 - - - - org.springframework - spring-beans - 2.5.5 - - - - org.springframework - spring-context - 2.5.5 - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java deleted file mode 100644 index 833cc50f71..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java deleted file mode 100644 index d6db2bd182..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/AddService.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/AddService.java deleted file mode 100644 index 5a1e7a638a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index a597691905..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/CalculatorService.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 78eea39c71..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 4363650e52..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/DivideService.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/DivideService.java deleted file mode 100644 index ef6a8b375b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index cd91935f08..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/MultiplyService.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c85357fcd8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/SubtractService.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 56ee372fc4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1b669084d9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java deleted file mode 100644 index b48fb90148..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java deleted file mode 100644 index fe4097640b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java deleted file mode 100644 index 09024197db..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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: 637276 $ $Date: 2008-03-15 03:05:34 +0530 (Sat, 15 Mar 2008) $ - */ -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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java deleted file mode 100644 index 77d98d50aa..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java deleted file mode 100644 index 830052ae19..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java deleted file mode 100644 index 73939693a4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java deleted file mode 100644 index 0e2374d599..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestBean.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestBean.java deleted file mode 100644 index 96df81fc0c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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: 430937 $ $Date: 2006-08-12 02:17:56 +0100 (Sat, 12 Aug 2006) $ - */ -public interface TestBean { - String echo(String msg); - - TestBean getBean(); - - void setBean(TestBean bean); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java deleted file mode 100644 index 538d3547f4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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: 441406 $ $Date: 2006-09-08 08:20:10 +0100 (Fri, 08 Sep 2006) $ - */ -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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java deleted file mode 100644 index 5c9dede7ec..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestReference.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestReference.java deleted file mode 100644 index 0a8742d242..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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: 536115 $ $Date: 2007-05-08 09:04:20 +0100 (Tue, 08 May 2007) $ - */ -public interface TestReference { - String echo(String msg); -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java deleted file mode 100644 index 27ccdbdd77..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java deleted file mode 100644 index 881ca8bb7d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java deleted file mode 100644 index 000b135f01..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/CalculatorService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/CalculatorService-context.xml deleted file mode 100644 index 7c84965629..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/CalculatorService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml deleted file mode 100644 index 910771b34d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringDelegationHelloWorld-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml deleted file mode 100644 index c20679241f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/SpringHelloWorld-context.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-access/CalculatorService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-access/CalculatorService-context.xml deleted file mode 100644 index 87458b99a3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-access/CalculatorService-context.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/CalculatorService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/CalculatorService-context.xml deleted file mode 100644 index 7c84965629..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/CalculatorService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/SpringImport-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/SpringImport-context.xml deleted file mode 100644 index 3faed92fd2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-imports/SpringImport-context.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml deleted file mode 100644 index c20679241f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/SpringHelloWorld-context.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/StockQuoteService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/StockQuoteService-context.xml deleted file mode 100644 index 74473073ea..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/StockQuoteService-context.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml deleted file mode 100644 index 930b92f4be..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/context-multiple/beanRefContext.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - META-INF/sca/context-multiple/StockQuoteService-context.xml - META-INF/sca/context-multiple/SpringHelloWorld-context.xml - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml deleted file mode 100644 index 7c84965629..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/implementation-policies/CalculatorService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/MANIFEST.MF b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/MANIFEST.MF deleted file mode 100644 index 950dbeba4c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/spring/SpringSCAProperty-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/spring/SpringSCAProperty-context.xml deleted file mode 100644 index 8613e6c82a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-folder/META-INF/spring/SpringSCAProperty-context.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar deleted file mode 100644 index 504d59e5ff..0000000000 Binary files a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/location-jar/spring-context.jar and /dev/null differ diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml deleted file mode 100644 index d18d8312e3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringExplicitReference-context.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml deleted file mode 100644 index df4b9b28cf..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-references/SpringImplicitReference-context.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml deleted file mode 100644 index 194bc4bcc9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringExplicitService-context.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml deleted file mode 100644 index 1c63311367..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/sca-services/SpringImplicitService-context.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/spring-annotation/CalculatorService-context.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/spring-annotation/CalculatorService-context.xml deleted file mode 100644 index 4110a9a7b7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/META-INF/sca/spring-annotation/CalculatorService-context.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite deleted file mode 100644 index 8863553419..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite deleted file mode 100644 index 2d6705ce56..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite deleted file mode 100644 index 15c0c39f51..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config deleted file mode 100644 index 0e7cb86633..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties deleted file mode 100644 index f62125eaa9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite deleted file mode 100644 index 28b62dfeb9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/implementation/policies/definitions.xml deleted file mode 100644 index 94e4997734..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite deleted file mode 100644 index d33ae8ca4b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - Hello - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite deleted file mode 100644 index e47b6526ff..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - Hello - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite deleted file mode 100644 index 9099abdbeb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite deleted file mode 100644 index 42c67ffa39..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite deleted file mode 100644 index 4aa9b7a56d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite deleted file mode 100644 index ae972f8647..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite deleted file mode 100644 index b259b9d657..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite deleted file mode 100644 index 8ab04edc63..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite deleted file mode 100644 index 21f89e6a1c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - HelloWorld - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java deleted file mode 100644 index 828e94ff65..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/access/CalculatorClient.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 context.access; - -import org.apache.tuscany.sca.node.Client; -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.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 { - - String location = ContributionLocationHelper.getContributionLocation("context/access/ContextAccess.composite"); - Node node = NodeFactory.newInstance().createNode("context/access/ContextAccess.composite", new Contribution("c1", location)); - 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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java deleted file mode 100644 index 5feb293bc8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java deleted file mode 100644 index e9bfaa0a1d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.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 context.imports; - -import org.apache.tuscany.sca.node.Client; -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.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 { - - String location = ContributionLocationHelper.getContributionLocation("context/imports/ContextImports.composite"); - Node node = NodeFactory.newInstance().createNode("context/imports/ContextImports.composite", new Contribution("c1", location)); - 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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java deleted file mode 100644 index 3940bf65fa..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java deleted file mode 100644 index 75b296bf32..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java deleted file mode 100644 index d8ecae99bd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.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.multiple; - -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 { - - System.out.println("Starting the Sample SCA StockQuote Service..."); - - String location = ContributionLocationHelper.getContributionLocation("context/multiple/MultipleContext.composite"); - Node node = NodeFactory.newInstance().createNode("context/multiple/MultipleContext.composite", new Contribution("c1", location)); - 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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java deleted file mode 100644 index 3f26b8c6db..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES 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 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.ContributionLocationHelper; -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()); - } - - String location = ContributionLocationHelper.getContributionLocation("implementation/policies/ImplementationPolicies.composite"); - Node node = NodeFactory.newInstance().createNode("implementation/policies/ImplementationPolicies.composite", new Contribution("c1", location)); - 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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java deleted file mode 100644 index efd5fd22df..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.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 implementation.policies; - -import junit.framework.TestCase; - -import org.junit.Ignore; - -/** - * Tests out the big bank service - * - */ -@Ignore("TUSCANY-3027") -public class ImplementationPoliciesTestCase extends TestCase { - - public void testServer() throws Exception { - CalculatorClient.main(new String[] {""}); - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java deleted file mode 100644 index 88ac2e8cb5..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.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 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 -} - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java deleted file mode 100644 index e3600a355c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.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 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 -} - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java deleted file mode 100644 index f93095e3c9..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.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; - - -/** - * 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 void testHello() throws Exception { - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected Class getServiceClass() { - return HelloWorld.class; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java deleted file mode 100644 index 605a0079fb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.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.itest.spring; - -import junit.framework.TestCase; -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; - - @Override - protected void setUp() throws Exception { - NodeFactory factory = NodeFactory.newInstance(); - String location = ContributionLocationHelper.getContributionLocation(getCompositeName()); - node = factory.createNode(getCompositeName(), new Contribution("c1", location)); - node.start(); - service = ((Client)node).getService(getServiceClass(), "ClientComponent"); - } - - abstract protected Class getServiceClass(); - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - - protected String getCompositeName() { - String className = this.getClass().getName(); - String compositeName = className.substring(0, className.length() - 8).replace('.', '/') + ".composite"; - System.out.println("Using composite: " + compositeName); - return compositeName; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java deleted file mode 100644 index e712593fe3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java deleted file mode 100644 index f75df2c75d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java deleted file mode 100644 index 32cb26979e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.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.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 -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java deleted file mode 100644 index f8f8886f9f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.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.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 -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java deleted file mode 100644 index d9522e12a0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java deleted file mode 100644 index 1ad1779ee2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java deleted file mode 100644 index 9bc12c3e7b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.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 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 -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java deleted file mode 100644 index 52ea64a3ed..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.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 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 -} - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java deleted file mode 100644 index 35f44b2af7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.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 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 -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java deleted file mode 100644 index 488bdcb202..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.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 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 -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java deleted file mode 100644 index 5a5056d91e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.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 spring.annotations; - -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; -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 { - - String location = ContributionLocationHelper.getContributionLocation("spring/annotations/Calculator.composite"); - Node node = NodeFactory.newInstance().createNode("spring/annotations/Calculator.composite", new Contribution("c1", location)); - 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)); - - /*calculatorService = - ((SCAClient)node).getService(CalculatorService.class, "AnotherCalculatorServiceComponent"); - - 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/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java deleted file mode 100644 index 3a9ec4bbb2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/interfaces/pom.xml deleted file mode 100644 index 99817cb3cf..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/interfaces/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-interfaces - Apache Tuscany SCA iTest Interface - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java deleted file mode 100644 index f4131593d5..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java deleted file mode 100644 index 5fc9ed51b3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java deleted file mode 100644 index 6cd937af12..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java deleted file mode 100644 index 05a9d09bdd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java deleted file mode 100644 index ab0b18191c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java deleted file mode 100644 index 724d94dffb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java deleted file mode 100644 index be3fa4c15a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java deleted file mode 100644 index 9f34dfd274..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java deleted file mode 100644 index 541b1f1508..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java deleted file mode 100644 index b29b298ab6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java deleted file mode 100644 index 00a0f5645b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/resources/InterfacesTest.composite b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/resources/InterfacesTest.composite deleted file mode 100644 index 8b3d0e8f63..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/main/resources/InterfacesTest.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java deleted file mode 100644 index 57ba18d0d6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.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.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.Test; - -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/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/pom.xml deleted file mode 100644 index ec124f23f7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-nodes-helloworld-client - Apache Tuscany SCA iTest Nodes Helloworld Client - - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M3 - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M3 - provided - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java deleted file mode 100644 index a8e74be096..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/java/itest/nodes/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 itest.nodes; - -import org.oasisopen.sca.annotation.Reference; - -public class HelloworldImpl implements Helloworld { - - @Reference - public Helloworld service; - - public String sayHello(String name) { - return "Hi " + service.sayHello(name); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d55aa7ba9c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite deleted file mode 100644 index 81a3fa1f2d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/pom.xml deleted file mode 100644 index 7ee22a320d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-nodes-helloworld-iface - Apache Tuscany SCA iTest Nodes Helloworld IFaces - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M3 - provided - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java deleted file mode 100644 index d49ebc2cef..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.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 itest.nodes; - -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/pom.xml deleted file mode 100644 index 24c4299f35..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-nodes-helloworld-service - Apache Tuscany SCA iTest Nodes Helloworld Service - - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M3 - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M3 - provided - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M3 - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java deleted file mode 100644 index 20233b0397..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 9c68ffd043..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite b/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite deleted file mode 100644 index 95d78b1983..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/one-node-test/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/one-node-test/pom.xml deleted file mode 100644 index 2b73398afe..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/one-node-test/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-nodes-one-nodes-test - Apache Tuscany SCA iTest Nodes One Nodes Test - - - - org.apache.tuscany.sca - itest-nodes-helloworld-iface - 2.0-M3 - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java deleted file mode 100644 index 63ddc789db..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/nodes/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/pom.xml deleted file mode 100644 index 9d153681ed..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - pom - itest-nodes - Apache Tuscany SCA iTest Nodes - - - install - - - - helloworld-iface - helloworld-service - helloworld-client - one-node-test - two-nodes-test - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/pom.xml deleted file mode 100644 index 6436ea09dc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../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-M3 - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - - - org.apache.tuscany.sca - tuscany-sca-client-impl - 2.0-M3 - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java deleted file mode 100644 index 8352f70e17..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES 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.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.client.SCAClient; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * This shows how to test the Calculator service component. - */ -public class TwoNodesTestCase{ - - private static Node serviceNode; - private static Node clientNode; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false"); - NodeFactory factory = NodeFactory.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(); - } - - /** - * 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 { - SCAClient scaClient = SCAClientFactory.newInstance(); - Helloworld service = scaClient.getService(Helloworld.class, "HelloworldService", null); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = scaClient.getService(Helloworld.class, "HelloworldClient", null); - 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/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/pom.xml deleted file mode 100644 index c72ca0ee2e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-operation-overloading - Apache Tuscany SCA iTest Operation Overloading - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java b/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java deleted file mode 100644 index 1f589b44f4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java b/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java deleted file mode 100644 index a30d3611fb..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java b/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java deleted file mode 100644 index 9ec60eb78f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/resources/OperationOverload.composite b/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/resources/OperationOverload.composite deleted file mode 100644 index cbf5aa2078..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/main/resources/OperationOverload.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java b/tags/java/sca/2.0-M3-RC5/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java deleted file mode 100644 index 62e5c14ce2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/pom.xml deleted file mode 100644 index 89fbb2b4c6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/pom.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M3 - ../pom.xml - - tuscany-itest - pom - Apache Tuscany SCA Integration Tests - - - - junit - junit - 4.5 - compile - - - - - - default - - true - - - - 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 - nodes - - - recursive-multi-level - references - scaclient-api - scopes - services - wires - - - - - 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 - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/properties/pom.xml deleted file mode 100644 index 1ba7bc62aa..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/pom.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-properties - Apache Tuscany SCA iTest Properties - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - - xalan - xalan - 2.7.1 - test - - - - org.apache.tuscany.sca - tuscany-core-databinding - 2.0-M3 - runtime - - - - org.apache.tuscany.sca - tuscany-databinding-sdo - 2.0-M3 - compile - - - - org.apache.tuscany.sca - tuscany-databinding-jaxb - 2.0-M3 - compile - - - - - - org.apache.tuscany.sdo - tuscany-sdo-plugin - 1.1.1 - - - generate-customer-sdo - generate-sources - - ${basedir}/src/main/resources/customer.xsd - com.example.customer.sdo - true - true - true - - - generate - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java deleted file mode 100644 index b0fd64c9da..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java deleted file mode 100644 index 7b44ef02e4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java deleted file mode 100644 index e8c4341cf2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java deleted file mode 100644 index 68ce5a3cb6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java deleted file mode 100644 index c8d0d4cae4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java deleted file mode 100644 index b727935bc1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java deleted file mode 100644 index e402131ce2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java deleted file mode 100644 index 52f9871d1b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java deleted file mode 100644 index fceda9d9ae..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java deleted file mode 100644 index 87f87d6c22..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java deleted file mode 100644 index acd1f26670..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java deleted file mode 100644 index 71dce41efc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java deleted file mode 100644 index 5217ede572..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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; - -import commonj.sdo.DataObject; - -/** - * 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 method is used to test injecting an Object Array - * - * @return The injected array - */ - public DataObject[] getSdoArrayProperty(); - - /** - * 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 DataObject getSdoProperty(); - - /** - * This is a method to get a property value from the SCA runtime environment. It is implemented in the class - * PropertyComponentImpl - */ - public DataObject getCustomerSdo(); - - /** - * 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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java deleted file mode 100644 index 5f8f28e46a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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; - -import com.example.customer.sdo.impl.CustomerImpl; -import commonj.sdo.DataObject; - -/** - * 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 CustomerImpl customerSdo; - - @Property - protected DataObject sdoProperty; - - @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(name = "sdoArray") - protected DataObject[] sdoArray; - - @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; - } - - public DataObject getSdoProperty() { - return sdoProperty; - } - - /** - * It is a method which injects the property value to the variable 'sdoProperty' from the SCA runtime environment. - */ - public void setSdoProperty(DataObject sdoProperty) { - System.out.println("Reached here da machi"); - this.sdoProperty = sdoProperty; - } - - public CustomerImpl getCustomerSdo() { - return customerSdo; - } - - /** - * It is a method which injects the property value to the variable 'customerSdo' from the SCA runtime environment. - */ - public void setCustomerSdo(CustomerImpl customerSdo) { - this.customerSdo = customerSdo; - } - - /** - * 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; - } - - /** - * This method is used to test injecting an Object Array - * - * @return The injected array - */ - public DataObject[] getSdoArrayProperty() { - return sdoArray; - } - - public String getLocationFromComponentContext() { - return context.getProperty(String.class, "location"); - } - - public ReturnCodeProperties getComplexJAXBPropertyOne() { - return complexJAXBPropertyOne; - } - - public ReturnCodeProperties getComplexJAXBPropertyTwo() { - return complexJAXBPropertyTwo; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java deleted file mode 100644 index a57ccd90c8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java deleted file mode 100644 index c147a2affe..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java deleted file mode 100644 index 7c700903d6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java deleted file mode 100644 index 1d2e563095..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java deleted file mode 100644 index 54082e297a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java deleted file mode 100644 index 15fb49ea4e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java deleted file mode 100644 index 0a1d4a34a3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/package-info.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/java/test/jaxb/props/package-info.java deleted file mode 100644 index 6a6fdd00cc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/ConstructorPropertyInjection.composite b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/ConstructorPropertyInjection.composite deleted file mode 100644 index 24a2cca822..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/ConstructorPropertyInjection.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - fubar - - - - - - fubar - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/Outer.composite b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/Outer.composite deleted file mode 100644 index 0ada194cb3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/Outer.composite +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Raleigh - 2008 - - - - - - - - - - - - - - - Durham - 2009 - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/OuterPropertyTest.composite b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/OuterPropertyTest.composite deleted file mode 100644 index 75fa0aaa81..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/PropertyTest.composite b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/PropertyTest.composite deleted file mode 100644 index 4d3715dba6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/PropertyTest.composite +++ /dev/null @@ -1,255 +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 - - - - - - - Firstly Name - Middler Name - Lasting Name - - - - - Sdo Firstly Name - Sdo Middler Name - Sdo Lasting Name - - - 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 - - - Firstly Name 1 - Middler Name 1 - Lasting Name 1 - - - Firstly Name 2 - Middler Name 2 - Lasting Name 2 - - - Firstly Name 3 - Middler Name 3 - Lasting Name 3 - - - - - 10 - 10 - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/customer.xsd b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/customer.xsd deleted file mode 100644 index 8861d7e7b8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/customer.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/fileProperty.txt b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/fileProperty.txt deleted file mode 100644 index 0d3d9ead83..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/fileProperty.txt +++ /dev/null @@ -1,21 +0,0 @@ - - - -fileValue diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/manyValuesFileProperty.txt b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/manyValuesFileProperty.txt deleted file mode 100644 index 450f397b30..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/manyValuesFileProperty.txt +++ /dev/null @@ -1,23 +0,0 @@ - - - - - "fileValueOne" "fileValueTwo" "fileValueThree" "fileValueFour" - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/mySimpleService.composite b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/mySimpleService.composite deleted file mode 100644 index b22b32bc30..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/mySimpleService.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - Raleigh - 2008 - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcProps.txt b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcProps.txt deleted file mode 100644 index 052c291fd0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcProps.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - - 20 - 20 - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcprops.xsd b/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcprops.xsd deleted file mode 100644 index 21289fa7b2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/main/resources/rcprops.xsd +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java deleted file mode 100644 index efc635c72b..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java deleted file mode 100644 index da1ec5186f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java deleted file mode 100644 index caf5a5e052..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java +++ /dev/null @@ -1,469 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * 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; - -import commonj.sdo.DataObject; - -/** - * 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]); - } - - /** - * 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 string values - * 'Firstly Name' , 'Middler Name' and 'Lasting Name' respectively - */ - @Test - public void testSDOProperty1() { - DataObject dataObject = propertyService.getSdoProperty(); - assertNotNull(dataObject); - assertEquals("Firstly Name", dataObject.get("firstName")); - assertEquals("Middler Name", dataObject.getString("middleName")); - assertEquals("Lasting Name", dataObject.getString("lastName")); - } - - /** - * 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 string values - * 'Sdo Firstly Name', 'Sdo Middler Name' and 'Sdo Lasting Name' respectively - */ - @Test - public void testSDOProperty2() { - DataObject dataObject = propertyService.getCustomerSdo(); - assertNotNull(dataObject); - assertEquals("Sdo Firstly Name", dataObject.get("firstName")); - assertEquals("Sdo Middler Name", dataObject.getString("middleName")); - assertEquals("Sdo Lasting Name", dataObject.getString("lastName")); - } - - @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 testGetInjectedSdoArrayProperty() { - DataObject[] sdos = propertyService.getSdoArrayProperty(); - assertNotNull(sdos); - - for (int i = 1; i <= 3; i++) { - DataObject dataObject = sdos[i - 1]; - assertEquals("Firstly Name " + i, dataObject.get("firstName")); - assertEquals("Middler Name " + i, dataObject.getString("middleName")); - assertEquals("Lasting Name " + i, dataObject.getString("lastName")); - } - } - - @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/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java deleted file mode 100644 index a0213ced46..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/pom.xml deleted file mode 100644 index 437fbbff44..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - - - itest-recursive-multi-level - Apache Tuscany SCA iTest Recusive Multi-Level - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - - xalan - xalan - 2.7.1 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java deleted file mode 100644 index 986c8305dd..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java deleted file mode 100644 index 6cad998042..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java deleted file mode 100644 index 261eff2584..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java deleted file mode 100644 index f3c9280f96..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite deleted file mode 100644 index 090bc49a41..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Level 1 - 2001 - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite deleted file mode 100644 index 8c1a9a2f72..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite deleted file mode 100644 index 884a8b0a96..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java deleted file mode 100644 index b9b4e3ba7c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/references/pom.xml deleted file mode 100644 index 05daa07fba..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/references/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-references - Apache Tuscany SCA iTest References - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java deleted file mode 100644 index f8c0850118..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java deleted file mode 100644 index 49c3deb84d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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 - protected 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") - 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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java deleted file mode 100644 index 785920bb2d..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java deleted file mode 100644 index 211e6160f6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java deleted file mode 100644 index 47a1f9bde8..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java deleted file mode 100644 index d436c28adc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java deleted file mode 100644 index a1823e1cdc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java deleted file mode 100644 index 80617bdec2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java deleted file mode 100644 index d181ac96ca..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/AutoWiredReferencesTest.composite b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/AutoWiredReferencesTest.composite deleted file mode 100644 index 5300107706..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/AutoWiredReferencesTest.composite +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/InnerReferencesTest.composite b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/InnerReferencesTest.composite deleted file mode 100644 index be4ac75b3c..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/InnerReferencesTest.composite +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/ManualWiredReferencesTest.composite b/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/ManualWiredReferencesTest.composite deleted file mode 100644 index d5596e3da4..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/references/src/main/resources/ManualWiredReferencesTest.composite +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java deleted file mode 100644 index 76264d308f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java deleted file mode 100644 index 6e4212fd9a..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java deleted file mode 100644 index 6349e4f827..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.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.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(); - } - - @Ignore - @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/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/pom.xml deleted file mode 100644 index 0af889cdf6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-scaclient-api - Apache Tuscany SCA iTest SCAClient API - - - - org.apache.tuscany.sca - tuscany-sca-client-impl - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - runtime - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/java/itest/HelloworldService.java b/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/java/itest/HelloworldService.java deleted file mode 100644 index 1c7edaefb6..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java deleted file mode 100644 index 4b9910bb21..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/resources/Helloworld.composite b/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/resources/Helloworld.composite deleted file mode 100644 index 0352aabfb1..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/resources/Helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index d8604a5cc0..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java deleted file mode 100644 index f8c0d9034e..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.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 test.scaclient; - -import itest.HelloworldService; - -import java.net.URI; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -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().getService(HelloworldService.class, - "HelloworldComponent", - URI.create(Node.DEFAULT_DOMAIN_URI)); - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/scopes/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/scopes/pom.xml deleted file mode 100644 index a154779531..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/scopes/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - Apache Tuscany SCA iTest Scopes - itest-scopes - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java b/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java deleted file mode 100644 index 208ac3ba44..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/RequestScopeStateVerifierImpl.java b/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/RequestScopeStateVerifierImpl.java deleted file mode 100644 index ff116070b5..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/RequestScopeStateVerifierImpl.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.scopes; - -import org.oasisopen.sca.annotation.Destroy; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; - -/** - * Test request scope - */ -@Scope("REQUEST") -public class RequestScopeStateVerifierImpl implements StateVerifier { - // State data for this request thread. - int requestState; - - public void setState(int i) { - requestState = i; - } - - public boolean checkState(int i) { - return (requestState == i); - } - - @Init - public void init() { - requestState = 0; - } - - @Destroy - public void destroy() { - requestState = -1; - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java b/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java deleted file mode 100644 index e6bf08ccf2..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/resources/scopes.composite b/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/resources/scopes.composite deleted file mode 100644 index ac6de1b8bc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/scopes/src/main/resources/scopes.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java deleted file mode 100644 index 959a6067ee..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.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 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; - - /** - * Test scope containers. - * - * The request scope container isn't hooked up for some reason so the code below - * that tests request scope is commented out. - * Code could be added to test session scope once it is supported in a standalone environment. - * - * @throws InterruptedException Test failed - */ - @Test - public void testScopes() throws InterruptedException { - - Thread[] moduleScopeThreadTable = new Thread[NUM_THREADS]; - Thread[] requestScopeThreadTable = new Thread[NUM_THREADS]; - - for (int i = 0; i < NUM_THREADS; i++) { - moduleScopeThreadTable[i] = new ModuleScopeTestThread(); - requestScopeThreadTable[i] = new RequestScopeTestThread(); - } - for (int j = 0; j < NUM_THREADS; j++) { - moduleScopeThreadTable[j].start(); - requestScopeThreadTable[j].start(); - } - for (int k = 0; k < NUM_THREADS; k++) { - moduleScopeThreadTable[k].join(); - requestScopeThreadTable[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); - } - } - } - } - - private class RequestScopeTestThread extends Thread { - - public void run() { - StateVerifier requestScopeService = node.getService(StateVerifier.class, "RequestScopeComponent"); - for (int i = 1; i <= ITERATIONS; i++) { - requestScopeService.setState(i); - if (!requestScopeService.checkState(i)) { - fail("The request scope service lost its state on iteration " + i); - } - } - } - } - - @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(); - } - -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/services/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/services/pom.xml deleted file mode 100644 index e2030af889..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/services/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-services - Apache Tuscany SCA iTest Services - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java deleted file mode 100644 index 26e58dc530..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java deleted file mode 100644 index 627ff4976f..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java deleted file mode 100644 index d04bd1b985..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java deleted file mode 100644 index 01df89a8fa..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java deleted file mode 100644 index 07397e4502..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java deleted file mode 100644 index 8713e5ab22..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java deleted file mode 100644 index 842a85e000..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java deleted file mode 100644 index 8a3923b351..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java deleted file mode 100644 index 59ffce8205..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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(interfaces = {DComponent.class, D1Component.class}) -public class DComponentImpl implements DComponent, D1Component { - - public String foo() { - return "DComponent"; - } - - public String foo1() { - return "DComponent"; - } -} diff --git a/tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/META-INF/sca-contribution.xml b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index a3c87f60c7..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/ServicesTest.composite b/tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/ServicesTest.composite deleted file mode 100644 index 9b7a30d850..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/services/src/main/resources/ServicesTest.composite +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tags/java/sca/2.0-M3-RC5/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java deleted file mode 100644 index da779b2c54..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/wires/pom.xml b/tags/java/sca/2.0-M3-RC5/itest/wires/pom.xml deleted file mode 100644 index f4e24067f3..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/wires/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-itest - 2.0-M3 - ../pom.xml - - itest-wires - Apache Tuscany SCA iTest Wires Basic - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M3 - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M3 - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M3 - test - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java b/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java deleted file mode 100644 index f5a4337254..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java b/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java deleted file mode 100644 index 82f0e26d58..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java b/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java deleted file mode 100644 index 67df1e3a52..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java b/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java deleted file mode 100644 index f0308252ba..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/resources/WireTest.composite b/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/resources/WireTest.composite deleted file mode 100644 index fc8f61f459..0000000000 --- a/tags/java/sca/2.0-M3-RC5/itest/wires/src/main/resources/WireTest.composite +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/tags/java/sca/2.0-M3-RC5/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java b/tags/java/sca/2.0-M3-RC5/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java deleted file mode 100644 index 2a0095cabc..0000000000 --- a/tags/java/sca/2.0-M3-RC5/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