From cdc5060abcdf963ad1e1de02e7275f41dbca9707 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 23 Mar 2009 08:00:46 +0000 Subject: Delete old m2 branch in the sandbox git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@757344 13f79535-47bb-0310-9956-ffa450edef68 --- sandbox/ant/sca/branches/2.0-M2/samples/README | 232 ------------ .../2.0-M2/samples/binding-ws-calculator/README | 97 ----- .../2.0-M2/samples/binding-ws-calculator/build.xml | 67 ---- .../samples/binding-ws-calculator/calculator.png | Bin 20552 -> 0 bytes .../samples/binding-ws-calculator/calculator.svg | 329 ---------------- .../2.0-M2/samples/binding-ws-calculator/pom.xml | 89 ----- .../src/main/java/calculator/AddService.java | 31 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../main/java/calculator/CalculatorClientImpl.java | 66 ---- .../main/java/calculator/CalculatorService.java | 35 -- .../java/calculator/CalculatorServiceImpl.java | 70 ---- .../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 -- .../src/main/java/sample/SampleClient.java | 26 -- .../src/main/java/sample/SampleClientImpl.java | 42 --- .../src/main/resources/Calculator.composite | 59 --- .../main/resources/META-INF/sca-contribution.xml | 23 -- .../test/java/calculator/CalculatorTestCase.java | 41 -- .../sca/branches/2.0-M2/samples/build-common.xml | 102 ----- .../2.0-M2/samples/calculator-equinox/README | 97 ----- .../2.0-M2/samples/calculator-equinox/build.xml | 78 ---- .../samples/calculator-equinox/calculator.png | Bin 20552 -> 0 bytes .../samples/calculator-equinox/calculator.svg | 329 ---------------- .../2.0-M2/samples/calculator-equinox/pom.xml | 91 ----- .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../src/main/java/calculator/CalculatorClient.java | 62 ---- .../main/java/calculator/CalculatorService.java | 35 -- .../java/calculator/CalculatorServiceImpl.java | 70 ---- .../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 -- .../src/main/resources/Calculator.composite | 54 --- .../test/java/calculator/CalculatorTestCase.java | 65 ---- .../samples/calculator-osgi/META-INF/MANIFEST.MF | 19 - .../branches/2.0-M2/samples/calculator-osgi/README | 97 ----- .../2.0-M2/samples/calculator-osgi/build.xml | 78 ---- .../2.0-M2/samples/calculator-osgi/pom.xml | 109 ------ .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../main/java/calculator/CalculatorActivator.java | 54 --- .../src/main/java/calculator/CalculatorClient.java | 52 --- .../main/java/calculator/CalculatorService.java | 34 -- .../java/calculator/CalculatorServiceImpl.java | 69 ---- .../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 -- .../src/main/resources/Calculator.composite | 54 --- .../test/java/calculator/CalculatorTestCase.java | 55 --- .../2.0-M2/samples/calculator-rmi-reference/README | 138 ------- .../samples/calculator-rmi-reference/build.xml | 84 ----- .../calculator-rmi-reference.png | Bin 23615 -> 0 bytes .../calculator-rmi-reference.svg | 412 --------------------- .../samples/calculator-rmi-reference/pom.xml | 82 ---- .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/CalculatorClient.java | 49 --- .../main/java/calculator/CalculatorService.java | 39 -- .../java/calculator/CalculatorServiceImpl.java | 68 ---- .../src/main/java/calculator/DivideService.java | 28 -- .../src/main/java/calculator/MultiplyService.java | 28 -- .../src/main/java/calculator/SubtractService.java | 28 -- .../resources/CalculatorRMIReference.composite | 42 --- .../calculator/CalculatorRMIReferenceTestCase.java | 70 ---- .../java/calculator/CalculatorRMIServiceImpl.java | 52 --- .../2.0-M2/samples/calculator-rmi-service/README | 147 -------- .../samples/calculator-rmi-service/build.xml | 76 ---- .../calculator-rmi-service.png | Bin 20814 -> 0 bytes .../calculator-rmi-service.svg | 330 ----------------- .../2.0-M2/samples/calculator-rmi-service/pom.xml | 67 ---- .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 30 -- .../src/main/java/calculator/CalculatorClient.java | 40 -- .../src/main/java/calculator/CalculatorServer.java | 45 --- .../main/java/calculator/CalculatorService.java | 36 -- .../java/calculator/CalculatorServiceImpl.java | 68 ---- .../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 -- .../main/resources/CalculatorRMIServer.composite | 53 --- .../main/resources/META-INF/sca-contribution.xml | 23 -- .../calculator/CalculatorRMIServerTestCase.java | 63 ---- .../sca/branches/2.0-M2/samples/calculator/README | 97 ----- .../branches/2.0-M2/samples/calculator/build.xml | 65 ---- .../2.0-M2/samples/calculator/calculator.png | Bin 20552 -> 0 bytes .../2.0-M2/samples/calculator/calculator.svg | 329 ---------------- .../sca/branches/2.0-M2/samples/calculator/pom.xml | 78 ---- .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../src/main/java/calculator/CalculatorClient.java | 48 --- .../main/java/calculator/CalculatorService.java | 35 -- .../java/calculator/CalculatorServiceImpl.java | 70 ---- .../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 -- .../src/main/resources/Calculator.composite | 49 --- .../main/resources/META-INF/sca-contribution.xml | 23 -- .../test/java/calculator/CalculatorTestCase.java | 66 ---- .../branches/2.0-M2/samples/helloworld-bpel/README | 151 -------- .../2.0-M2/samples/helloworld-bpel/build.xml | 95 ----- .../samples/helloworld-bpel/helloworld-bpel.png | Bin 8897 -> 0 bytes .../samples/helloworld-bpel/helloworld-bpel.svg | 179 --------- .../2.0-M2/samples/helloworld-bpel/pom.xml | 198 ---------- .../src/main/java/helloworld/BPELClient.java | 45 --- .../src/main/java/helloworld/Hello.java | 29 -- .../main/resources/META-INF/sca-contribution.xml | 23 -- .../src/main/resources/helloworld.bpel | 66 ---- .../src/main/resources/helloworld.composite | 33 -- .../src/main/resources/helloworld.wsdl | 82 ---- .../src/main/resources/log4j.properties | 35 -- .../helloworld/BPELHelloWorldTestCase.java.FIXME | 62 ---- .../samples/implementation-java-calculator/README | 96 ----- .../implementation-java-calculator/build.xml | 59 --- .../implementation-java-calculator/calculator.png | Bin 20552 -> 0 bytes .../implementation-java-calculator/calculator.svg | 329 ---------------- .../samples/implementation-java-calculator/pom.xml | 65 ---- .../src/main/java/calculator/AddService.java | 28 -- .../src/main/java/calculator/AddServiceImpl.java | 35 -- .../src/main/java/calculator/CalculatorClient.java | 62 ---- .../main/java/calculator/CalculatorService.java | 35 -- .../java/calculator/CalculatorServiceImpl.java | 70 ---- .../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 -- .../src/main/resources/Calculator.composite | 54 --- .../test/java/calculator/CalculatorTestCase.java | 73 ---- .../sca/branches/2.0-M2/samples/logging.properties | 25 -- sandbox/ant/sca/branches/2.0-M2/samples/pom.xml | 64 ---- .../2.0-M2/samples/webapps/helloworld-jsf/pom.xml | 62 ---- .../src/main/java/sample/HelloWorldController.java | 56 --- .../src/main/java/sample/HelloworldService.java | 25 -- .../main/java/sample/HelloworldServiceImpl.java | 27 -- .../src/main/webapp/WEB-INF/faces-config.xml | 51 --- .../src/main/webapp/WEB-INF/web.composite | 34 -- .../helloworld-jsf/src/main/webapp/WEB-INF/web.xml | 181 --------- .../helloworld-jsf/src/main/webapp/helloWorld.jsp | 40 -- .../helloworld-jsf/src/main/webapp/index.jsp | 23 -- .../helloworld-jsf/src/main/webapp/page2.jsp | 38 -- .../2.0-M2/samples/webapps/helloworld-jsp/pom.xml | 55 --- .../src/main/java/sample/HelloworldService.java | 25 -- .../main/java/sample/HelloworldServiceImpl.java | 28 -- .../src/main/webapp/WEB-INF/web.composite | 34 -- .../helloworld-jsp/src/main/webapp/WEB-INF/web.xml | 41 -- .../helloworld-jsp/src/main/webapp/hello.jsp | 37 -- .../samples/webapps/helloworld-stripes/pom.xml | 65 ---- .../main/java/mystripes/action/BaseActionBean.java | 15 - .../main/java/mystripes/action/HomeActionBean.java | 27 -- .../src/main/java/sample/HelloworldService.java | 25 -- .../main/java/sample/HelloworldServiceImpl.java | 28 -- .../src/main/resources/StripesResources.properties | 57 --- .../src/main/resources/log4j.properties | 31 -- .../src/main/webapp/WEB-INF/jsp/home.jsp | 8 - .../src/main/webapp/WEB-INF/jsp/layout.jsp | 21 -- .../src/main/webapp/WEB-INF/jsp/taglibs.jsp | 11 - .../src/main/webapp/WEB-INF/web.composite | 34 -- .../src/main/webapp/WEB-INF/web.xml | 61 --- .../helloworld-stripes/src/main/webapp/index.html | 6 - .../samples/webapps/helloworld-wicket/pom.xml | 76 ---- .../src/main/java/sample/HelloworldService.java | 25 -- .../main/java/sample/HelloworldServiceImpl.java | 28 -- .../src/main/java/sample/wicket/HomePage.html | 30 -- .../src/main/java/sample/wicket/HomePage.java | 48 --- .../src/main/java/sample/wicket/IMyService.java | 17 - .../src/main/java/sample/wicket/MyService.java | 20 - .../main/java/sample/wicket/WicketApplication.java | 29 -- .../src/main/resources/log4j.properties | 12 - .../src/main/webapp/WEB-INF/web.composite | 34 -- .../src/main/webapp/WEB-INF/web.xml | 50 --- .../2.0-M2/samples/webapps/helloworld/pom.xml | 55 --- .../src/main/java/sample/HelloworldService.java | 25 -- .../main/java/sample/HelloworldServiceImpl.java | 38 -- .../src/main/webapp/WEB-INF/web.composite | 29 -- .../helloworld/src/main/webapp/WEB-INF/web.xml | 37 -- 191 files changed, 10860 deletions(-) delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.png delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.svg delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/AddService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/AddServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClientImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/DivideService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/MultiplyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/SubtractService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/Calculator.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/build-common.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.png delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.svg delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/AddService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/AddServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/DivideService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/MultiplyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/SubtractService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/resources/Calculator.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/META-INF/MANIFEST.MF delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/AddService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/DivideService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/SubtractService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/resources/Calculator.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.png delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.svg delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.png delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.svg delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/AddService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.png delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.svg delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/AddService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/AddServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/DivideService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/MultiplyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/SubtractService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/Calculator.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.png delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.svg delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/Hello.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.bpel delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.wsdl delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/log4j.properties delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java.FIXME delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/README delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/build.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.png delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.svg delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/AddService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/AddServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorClient.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/DivideService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/DivideServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/MultiplyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/MultiplyServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/SubtractService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/SubtractServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/resources/Calculator.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/test/java/calculator/CalculatorTestCase.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/logging.properties delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloWorldController.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloworldService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/faces-config.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/helloWorld.jsp delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/index.jsp delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/page2.jsp delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/HelloworldService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/hello.jsp delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/BaseActionBean.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/HomeActionBean.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/HelloworldService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/StripesResources.properties delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/log4j.properties delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/home.jsp delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/layout.jsp delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/taglibs.jsp delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/index.html delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/HelloworldService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.html delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/IMyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/MyService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/WicketApplication.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/resources/log4j.properties delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/pom.xml delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/HelloworldService.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/HelloworldServiceImpl.java delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.composite delete mode 100644 sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.xml (limited to 'sandbox/ant/sca/branches/2.0-M2/samples') diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/README b/sandbox/ant/sca/branches/2.0-M2/samples/README deleted file mode 100644 index 4ccefa3695..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/README +++ /dev/null @@ -1,232 +0,0 @@ -The Apache Tuscany SCA Samples -============================== -The Apache Tuscany SCA samples are built as part of the main Maven build and -run, using the provided JUnit test cases, as tests in the Maven build. - -In the binary distribution of Apache Tuscany most samples can also -be run using the provided Ant build.xml files. These show the samples running -from a simple main() method without the need for a JUnit test case. - -In these notes text that appears in angled brackets like this means -that you need to make a choice and provide your own text at that point. - -These simple samples have been created with the intention of illustrating the -usage of the SCA API and annotations and certainly not to levels of SCA component -abstraction. In real life situations you should use SCA to assemble real and -usually bigger components, and when you do that you'll get all the benefits of -SCA, bindings, policies, integration in an SOA environment etc.. - -Sample Overview ---------------- -The samples generally show off different features of the SCA runtime -and the extensions that come packaged with it. - -binding-ws-calculator - Calculator running inside a web app also - showing webservices binding - -calculator - Calculator built with java components and - local wires. - -calculator-equinox - Calculator running inside a Equinox OSGi runtime - -calculator-osgi - Calculator running inside a OSGi runtime - -calculator-rmi-reference - The calculator configured to talk RMI to - the calculator-rmi-service sample -calculator-rmi-service - The calculator configured to accept RMI - requests from calculator-rmi-reference - -implementation-java-calculator - - -Sample Layout -------------- -All sample directories are organized in the same way based on the default -project template provided by Maven. For example, take a look at the calculator -sample; - -calculator/ - src/ - Holds all of the source files for the sample - main/ - Groups together the files that implement the sample - java/ - Java source files - resources/ - Non java resource files such as composte files - test/ - Groups together files that provide sample tests - java - Java test sources files. Usually JUnit test cases - target/ - Holds the files generated when the sample is built - classes/ - For example, Java class files - test-classes/ - classes from src/test and other test files - -Getting Ready To Build ----------------------- -You will need to install the following software before you start. - -J2SE Development Kit (JDK) 5.0 -Apache Ant 1.7.1 - if you are going to use Ant -Apache Maven 2.0.9 - if you are going to use Maven - -Java and Ant and/or Maven binary directories must be present in your PATH so -that their executable programs are available in your environment. You may -find it useful to use a script to set up your environment, for example; - -For UNIX: - JAVA_HOME=/ - ANT_HOME=//apache-ant-1.7.0 - MAVEN_HOME=//maven-2.0.6 - export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:$PATH - -For Windows: - set JAVA_HOME=C:\ - set ANT_HOME=C:\\apache-ant-1.7.0 - set MAVEN_HOME=C:\\maven-2.0.6 - set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% - - -Building And Running The SCA Samples Using Ant ----------------------------------------------- -The build.xml files provided with the Apache Tuscany SCA samples are designed -to work with the binary distribution. They rely on the tuscany-sca-manifest.jar -to describe the class path and this jar is only provided as part of the -binary distribution. - -The binary distribution of SCA also includes precompiled versions of each sample. -If you look in the target directory of each sample you will see this jar file. To -run a sample based on all of the precompiled artifacts all you have to do is: - -cd -ant run - -Check each /README file as some samples require that two progams are -run to get the desired result, for example, the two samples that show how -to build extensions are run from their associated application samples. - -If you want to rebuild a sample, for example, if you have changed it, do the -following: - -cd -ant compile - -Once the sample is built you have the option of running the sample in whatever -way best suits you. Two alternatives are provided in the ant build files. - -The compile target builds the class files and then builds the jar so you can use -the same command as before: - -ant run - -This will use the generated jar to run the samples. The command line version of -this is: - -on Windows - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\ - -for example : java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -on *nix - -java -cp ../../features/tuscany-sca-manifest.jar:target/ - -for example : java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - - -You can use the compiled classes directly using - -ant run-classes - -The command line version of this is: - -on Windows - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\classes - -for example : java -cp ..\..\features\tuscany-sca-manifest.jar;target\classes calculator.CalculatorClient - -on *nix - -java -cp ../../features/tuscany-sca-manifest.jar:target/classes - -for example : java -cp ../../features/tuscany-sca-manifest.jar:target/classes calculator.CalculatorClient - -The class specified on the command of course depends on which sample you want to -run. In the examples we have used we are running the CalculatorClient from the calculator sample. - - -Building And Running The SCA Samples Using Maven ------------------------------------------------- - -The Maven build process will work from both source and binary distributions. -To build and test all of the Apache Tuscany SCA sources, including the samples, -do the following. - -cd sca -mvn - -This will take a little while to complete. Experience with Maven tells us that -sometimes there are problems downloading the dependencies that Apache Tuscany -SCA requires. If Maven reports that it cannot download required dependencies -try running the Maven build again. - -Once you have all of the source built you can build and run each sample -independently if required. - -cd -mvn - -When using Maven the samples are run within JUnit test cases and so you will -sometimes not see any test output. You will always see an indication of test -success or failure. - -Using The Samples In An IDE ---------------------------------------------- -The easiest way to use the samples in an IDE is to use Maven to generate all -of the IDE project files for you automatically. This works best if you -generate IDE projects for all of the Apache Tuscany modules. You can then -include the ones you are interested in working with in you IDE. - -To build IDE project files for all of the modules in Apache Tuscany SCA; - -cd sca - -If you are an Eclipse user do the following - -mvn -Peclipse - -If you are an IDEA user do the following - -mvn idea:idea - -These commands generate project files for each module in Apache Tuscany SCA. -The modules you are interested in can now be included in your IDE, for example, -in Eclipse, if you create a new Java project and use the option to "create a -new project from existing source" you can specify an SCA module directory, -which includes the generated project files, and Eclipse will treat it like any -other Java project. - -Using The Samples In An IDE Without Maven ------------------------------------------ -We don't provide any IDE project files with our distributions so you will have to -import the sample files into your IDE manually. Here's an example of how it can be -done using Eclipse. - -In a new or existing workspace - Create a new java project to represent the sample you want to work on, e.g. - calculator - Import all of the sample code and resources into this project, e.g. - File, Import and then select tuscany-sca-1.0-incubating\samples\calculator from the filesystem - Configure the source path to include - src/main/java - src/main/resources - Configure the output folder to be - calculator/target - Configure the build path to include the manifest jar tuscany-sca-manifiest.jar provided in - features - If you select calculator.CalculatorClient.java and run as "Java Application" you should see - 3 + 2=5.0 - 3 - 2=1.0 - 3 * 2=6.0 - 3 / 2=1.5 - -The details of how to do this for other development environments will -vary but the process will be similar. - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/README b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/README deleted file mode 100644 index fb5afcc7ec..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-binding-ws-calculator.jar sample.SampleClientImpl - -and on *nix do - -java -cp ../../features/tuscany-sca-manifest.jar:target/sample-binding-ws-calculator.jar sample.SampleClientImpl - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/build.xml deleted file mode 100644 index e13ec494b0..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/build.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.png b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.png and /dev/null differ diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.svg b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.svg deleted file mode 100644 index af34f07e04..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/pom.xml deleted file mode 100644 index c2efdd1bb6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-binding-ws-calculator - Apache Tuscany SCA Sample Binding WS Calculator - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-feature-api - pom - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-feature-core - pom - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-feature-webservice - pom - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-feature-ejava - pom - 2.0-M2-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/AddService.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/AddService.java deleted file mode 100644 index dd7ecb827d..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/AddService.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; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The Add service interface - */ -@Remotable -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/AddServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/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; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClientImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClientImpl.java deleted file mode 100644 index 7e5ff160f0..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorClientImpl.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; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -import sample.SampleClient; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") -public class CalculatorClientImpl implements SampleClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - /** - * This code used to be in an @Init method which removed the need for a JSE client - * to prod the compoite. However OASIS is debating whether to allow references to be used - * inside @Init methods and it can cause deadlocks in our runtime. So rather than make - * changes in the runtime we are falling backon the JSE drive mechanism until we know - * which way the specs are going - */ - public void runSample() { - System.out.println("SCA API ClassLoader: " + print(Reference.class.getClassLoader())); - 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)); - } - - private static String print(ClassLoader cl) { - StringBuffer buf = new StringBuffer(); - for (; cl != null;) { - buf.append(cl.toString()); - buf.append(' '); - cl = cl.getParent(); - } - return buf.toString(); - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorService.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorService.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; - - -/** - * 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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 17fad7de6b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.oasisopen.sca.annotation.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - 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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/DivideService.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/DivideServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/MultiplyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/MultiplyServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/SubtractService.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/SubtractServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClient.java deleted file mode 100644 index 6620f6a5e7..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClient.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 sample; - -/** - * The sample service interface. - */ -public interface SampleClient { - void runSample(); -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.java deleted file mode 100644 index 3f6ecfdb03..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/java/sample/SampleClientImpl.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 sample; - -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 SampleClientImpl { - public static void main(String[] args) throws Exception { - Node node = NodeFactory.newInstance().createNode(); - - node.start(); - - SampleClient sampleClient = node.getService(SampleClient.class, "SampleClient"); - sampleClient.runSample(); - - node.stop(); - - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/Calculator.composite b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/Calculator.composite deleted file mode 100644 index 29dd7e3b6f..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/Calculator.composite +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 27a1ee74e4..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java b/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index bc90f0e566..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.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 calculator; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.equinox.launcher.Contribution; -import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper; -import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import sample.SampleClientImpl; - -/** - * Test the Calculator composition. - */ -public class CalculatorTestCase { - - @Test - public void testSample() throws Exception { - SampleClientImpl.main(null); - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/build-common.xml b/sandbox/ant/sca/branches/2.0-M2/samples/build-common.xml deleted file mode 100644 index 2354dd1ce4..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/build-common.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - Distribution: ${distro.root} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/README b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/README deleted file mode 100644 index 7f76542622..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator-equinox.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator-equinox.jar calculator.CalculatorClient - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/build.xml deleted file mode 100644 index 75c4839cfa..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/build.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.png b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.png and /dev/null differ diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.svg b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.svg deleted file mode 100644 index af34f07e04..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/pom.xml deleted file mode 100644 index ee9464fdd5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-calculator-equinox - Apache Tuscany SCA Sample Calculator Equinox - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-launcher-equinox - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-node-runtime - 2.0-M2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-extensibility-equinox - 2.0-M2-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/AddService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/AddServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 84c98d7f70..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") @EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - - // Calculate - System.out.println("SCA API ClassLoader: " + print(Reference.class.getClassLoader())); - 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)); - } - - private static String print(ClassLoader cl) { - StringBuffer buf = new StringBuffer(); - for (; cl != null;) { - buf.append(cl.toString()); - buf.append(' '); - cl = cl.getParent(); - } - return buf.toString(); - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorService.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; - - -/** - * 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 17fad7de6b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.oasisopen.sca.annotation.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/DivideService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/DivideServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/MultiplyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/MultiplyServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/SubtractService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/SubtractServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/resources/Calculator.composite b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/resources/Calculator.composite deleted file mode 100644 index 9450558145..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/main/resources/Calculator.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index b49e1da130..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package calculator; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.equinox.launcher.Contribution; -import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper; -import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This shows how to test the Calculator composition. - */ -public class CalculatorTestCase { - - private static NodeLauncher launcher; - private static Node node; - - public static void main(String[] args) throws Exception { - setUpBeforeClass(); - tearDownAfterClass(); - } - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - launcher = NodeLauncher.newInstance(); - String location = ContributionLocationHelper.getContributionLocation(CalculatorClient.class); - node = launcher.createNode("Calculator.composite", new Contribution("test", location)); - System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader()); - node.start(); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node.destroy(); - } - if (launcher != null) { - launcher.destroy(); - } - } - - @Test - public void testDummy() throws Exception { - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/META-INF/MANIFEST.MF b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/META-INF/MANIFEST.MF deleted file mode 100644 index 56d59b05ff..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0 -Private-Package: calculator;version="2.0.0" -Tool: Bnd-0.0.255 -Bundle-Name: Apache Tuscany SCA Calculator OSGi Sample -Created-By: 1.6.0_07 (Sun Microsystems Inc.) -Bundle-Vendor: The Apache Software Foundation -Eclipse-LazyStart: false -Bundle-Version: 2.0.0 -Bnd-LastModified: 1223949424781 -Bundle-Activator: calculator.CalculatorActivator -Bundle-ManifestVersion: 2 -Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt -Bundle-Description: Apache Tuscany SCA Calculator OSGi Sample -Import-Package: org.apache.tuscany.sca.node;version="2.0.0", - org.oasisopen.sca.annotation;version="2.0.0", - org.osgi.framework;version="1.4" -Bundle-SymbolicName: sample-calculator-osgi -Bundle-DocURL: http://www.apache.org/ - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/README b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/README deleted file mode 100644 index 332526d43a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components and run it in a OSGi environment. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -jar ..\..\features\tuscany-sca-equinox-manifest.jar -composite Calculator.composite -config ..\..\features\configuration\ -ttl 0 target\sample-calculator-osgi.jar - -and on *nix do - -java -jar ../../features/tuscany-sca-equinox-manifest.jar -composite Calculator.composite -config ../../features/configuration/ -ttl 0 target/sample-calculator-osgi.jar - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/build.xml deleted file mode 100644 index 46522211f9..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/build.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/pom.xml deleted file mode 100644 index 304422e4a9..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-calculator-osgi - Apache Tuscany SCA Sample Calculator OSGi - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-feature-api - 2.0-M2-SNAPSHOT - pom - - - - org.apache.tuscany.sca - tuscany-feature-core - 2.0-M2-SNAPSHOT - pom - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - - maven-eclipse-plugin - 2.5.1 - - - org.eclipse.pde.ManifestBuilder - org.eclipse.jdt.core.javabuilder - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - - org.eclipse.jdt.launching.JRE_CONTAINER - - - - - - - maven-jar-plugin - - - ${basedir}/META-INF/MANIFEST.MF - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/AddService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java deleted file mode 100644 index 4408568629..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.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 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.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -/** - * Bundle Activator for Calculator - * - */ -public class CalculatorActivator implements BundleActivator { - private Node node; - - public void start(BundleContext context) throws Exception { - try { - NodeFactory factory = NodeFactory.newInstance(); - String url = ContributionLocationHelper.getContributionLocation(getClass()); - Contribution contrib = new Contribution("c1", url); - node = factory.createNode("Calculator.composite", contrib); - node.start(); - } catch (Throwable e) { - e.printStackTrace(); - } - } - - public void stop(BundleContext context) throws Exception { - if (node != null) { - node.stop(); - node = null; - } - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index afd5ea48fc..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorClient.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 calculator; - -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") -@EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - // Calculate - System.out.println("SCA API ClassLoader: " + Reference.class.getClassLoader()); - 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)); - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index c89043276e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 39f55ca31f..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.oasisopen.sca.annotation.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/DivideService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/SubtractService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/resources/Calculator.composite b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/resources/Calculator.composite deleted file mode 100644 index 9450558145..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/main/resources/Calculator.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 9d9b0a9ffb..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-osgi/src/test/java/calculator/CalculatorTestCase.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 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.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This shows how to test the Calculator composition. - */ -public class CalculatorTestCase { - - private static Node node; - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - String location = ContributionLocationHelper.getContributionLocation(CalculatorClient.class); - node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("test", location)); - System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader()); - node.start(); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node.destroy(); - } - } - - @Test - public void testDummy() throws Exception { - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/README b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/README deleted file mode 100644 index 07b6dd9713..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/README +++ /dev/null @@ -1,138 +0,0 @@ -Calculator RMI Reference Sample -=============================== - -This sample illustrates the use of Tuscany RMI Binding to call reference -services that are hosted as Java RMI services. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, first -navigate to the calculator-rmi-service sample and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator-rmi-service.jar calculator.CalculatorServer - -and on *nix do - -java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator-rmi-service.jar calculator.CalculatorServer - -Now you have the server running you need to open another command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator-rmi-reference.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator-rmi-reference.jar calculator.CalculatorClient - -Sample Overview ---------------- -This sample extends the calculator sample by replacing the local wired -connections with RMI bindings. Instead of local add, subtract, multiply and -divide components, an RMI service implementation now provides the -add, subtract, multiply and divide interfaces and is hosted as an RMI server. -References specified in the .composite file include an RMI binding which targets -this RMI server. - -This sample adds a number of classes to the basic calculator sample: - -calculator-rmi-reference/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - as calculator sample - AddService.java - as calculator sample - SubtractService.java - as calculator sample - MultipleService.java - as calculator sample - DivideService.java - as calculator sample - CalculatorClient.java - as calculator sample - CalculatorServiceImpl.java - calls the RMI service - that provides the target for the - RMI bindings in the composite - resources/ - CalculatorRMIReference.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorRMIReferenceTestCase.java - JUnit test case - CalculatorRMIServiceImpl.java - test RMI service to call - calculator-rmi-reference.png - a pictorial representation of the - .composite file - build.xml - the Ant build file for the client - pom.xml - the Maven build file - -Note. As this test creates and uses local network connections you may need to -configure your firewall, if you are running one, to allow the test to run -successfully. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. - -The server provides an RMI server that the acts as a target for the SCA RMI -bindings. Start a new console and use the following commands. - -cd calculator-rmi-service -ant compile -ant run - -This will run up the server and display the following. - -run: - [java] Starting of the SCA Calculator Application exposed as RMI Services... - [java] ...Press Enter to Exit... - -The client is very similar to the calculator sample. It starts the SCA runtime -and calls each of the calculator operations. In doing this the RMI bindings -make calls out to the RMI server you started in the previous step. Start -a new console and use the following commands. - -cd calculator-rmi-reference -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -If you now return to the console window running the server and press enter the -server should stop. - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-rmi-reference -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorRMIReferenceTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.308 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/build.xml deleted file mode 100644 index 16d94c3b0b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/build.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.png b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.png deleted file mode 100644 index 8c76b77a9f..0000000000 Binary files a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.png and /dev/null differ diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.svg b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.svg deleted file mode 100644 index ba802e6717..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/calculator-rmi-reference.svg +++ /dev/null @@ -1,412 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - CalculatorServiceRMIImpl - addService - subtractService - multiplyService - divideService - - - - - AddReference - SubtractReference - MultiplyReference - DivideReference - RMIRegistry - - - - - RMI RMI RMI RMI - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/pom.xml deleted file mode 100644 index d8acfae1e1..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-calculator-rmi-reference - Apache Tuscany SCA Sample Calculator RMI Reference - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M2-SNAPSHOT - test - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M2-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-rmi-runtime - 2.0-M2-SNAPSHOT - runtime - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - calculator.CalculatorClient - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/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 interface for the add service - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 3ee36be233..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/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 uri = ContributionLocationHelper.getContributionLocation("CalculatorRMIReference.composite"); - Contribution contribution = new Contribution("c1", uri); - Node node = NodeFactory.newInstance().createNode("CalculatorRMIReference.composite", contribution); - node.start(); - CalculatorService calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - - // 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 0bac3da45c..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorService.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 calculator; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The Calculator service interface. - */ -@Remotable -public interface CalculatorService extends Remote { - - double add(double n1, double n2) throws RemoteException; - - double subtract(double n1, double n2) throws RemoteException; - - double multiply(double n1, double n2) throws RemoteException; - - double divide(double n1, double n2) throws RemoteException; -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 675350860e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.oasisopen.sca.annotation.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/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 interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/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 subtract service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite deleted file mode 100644 index a5510954e0..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/main/resources/CalculatorRMIReference.composite +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.java deleted file mode 100644 index b7aa70f122..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIReferenceTestCase.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 calculator; - -import static org.junit.Assert.assertEquals; - -import java.rmi.registry.LocateRegistry; -import java.rmi.registry.Registry; - -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 shows how to test the Calculator service component. - */ -public class CalculatorRMIReferenceTestCase { - - private static Node node; - private static CalculatorService calculatorService; - - @BeforeClass - public static void setUp() throws Exception { - CalculatorRMIServiceImpl rmiCalculatorImpl = new CalculatorRMIServiceImpl(); - Registry rmiRegistry = LocateRegistry.createRegistry(8099); - rmiRegistry.bind("CalculatorRMIService", rmiCalculatorImpl); - - String uri = ContributionLocationHelper.getContributionLocation(CalculatorService.class); - Contribution contribution = new Contribution("c1", uri); - node = NodeFactory.newInstance().createNode("CalculatorRMIReference.composite", contribution); - node.start(); - calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - } - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - LocateRegistry.getRegistry(8099).unbind("CalculatorRMIService"); - } - - @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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.java deleted file mode 100644 index d8ded42cb2..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-reference/src/test/java/calculator/CalculatorRMIServiceImpl.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 calculator; - -import java.rmi.RemoteException; -import java.rmi.server.UnicastRemoteObject; - - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorRMIServiceImpl extends UnicastRemoteObject implements CalculatorService { - - private static final long serialVersionUID = -1543948944662001428L; - - public CalculatorRMIServiceImpl() throws RemoteException { - super(); - } - - public double add(double n1, double n2) throws RemoteException { - return n1 + n2; - } - - public double subtract(double n1, double n2) { - return n1 - n2; - } - - public double multiply(double n1, double n2) { - return n1 * n2; - } - - public double divide(double n1, double n2) { - return n1 / n2; - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/README b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/README deleted file mode 100644 index 144881134b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/README +++ /dev/null @@ -1,147 +0,0 @@ -Calculator RMI Service Sample -============================= - -This sample illustrates the use of Tuscany RMI Binding to expose component -services as Java RMI Services. It also demonstrates how a simple Java RMI -Client application invokes the SCA Application's services exposed as RMI -Services. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator-rmi-service.jar calculator.CalculatorServer - -and on *nix do - -java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator-rmi-service.jar calculator.CalculatorServer - -Now you have the server running you need to open another command prompt, navigate -to the calculator-rmi-reference sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-rmi-reference.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-rmi-reference.jar calculator.CalculatorClient - - -Sample Overview ---------------- -This sample extends the calculator sample by replacing the local service -binding with an RMI binding. SO a java client can call the service exposed -by the SCA application using an RMI client. - -This sample adds a number of classes to the basic calculator sample: - -calculator-rmi-service/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - as calculator sample - CalculatorServiceImpl.java - AddService.java - as calculator sample - AddServiceImpl.java - SubtractService.java - as calculator sample - SubtractServiceImpl.java - MultiplyService.java - as calculator sample - MultiplyServiceImpl.java - DivideService.java - as calculator sample - DivideServiceImpl.java - CalculatorClient.java - (Not currently used) Uses the - java naming service to - look up the Calculator RMI service. - It then calls add, subtract, multiple - and divide methods on the service - CalculatorServer.java - starts the SCA Runtime and deploys - the CalculatorRMIServer.composite. - In doing this the SCA RMI binding - acts to expose the CalculatorService - over RMI. - resources/ - CalculatorRMIServer.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorRMIServerTestCase.java - JUnit test case - calculator-rmi-service.png - a pictorial representation of the - .composite file - build.xml - the Ant build file for the server - pom.xml - the Maven build file - -Note. As this test creates and uses local network connections you may need to -configure your firewall, if you are running one, to allow the test to run -successfully. - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant. Two -build files are used to support client and server functions. - -The server starts the SCA runtime and loads the SCA calculator application -which exposes an RMI service. Start a new console and use the following -commands. - -cd calculator-rmi-service -ant compile -ant run - -This will run up the server and display the following. - -run: - [java] Starting of the SCA Calculator Application exposed as RMI Services... - [java] ...Press Enter to Exit... - -The client is very similar to the calculator sample - -It locates the RMI service that the SCA runtime is exposing and calls each of -the calculator operations. Start a new console and use the following commands. - -cd calculator-rmi-reference -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -If you now return to the console window running the server and press enter the -server should stop. - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator-rmi-service -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorRMIServerTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.819 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/build.xml deleted file mode 100644 index a0889ccc8a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/build.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.png b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.png deleted file mode 100644 index 574f5eb14b..0000000000 Binary files a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.png and /dev/null differ diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.svg b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.svg deleted file mode 100644 index 9253110f98..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/calculator-rmi-service.svg +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService(RMI) - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/pom.xml deleted file mode 100644 index 600ca69a37..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-calculator-rmi-service - Apache Tuscany SCA Sample Calculator RMI Service - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M2-SNAPSHOT - test - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M2-SNAPSHOT - runtime - - - org.apache.tuscany.sca - tuscany-binding-rmi-runtime - 2.0-M2-SNAPSHOT - runtime - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/AddService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/AddService.java deleted file mode 100644 index ec57a6a533..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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 interface for the add service - */ -public interface AddService { - - double add(double n1, double n2); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index e9c635e3c8..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 2b99485b68..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorClient.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 calculator; - -import java.rmi.Naming; - -/** - * 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 { - CalculatorService calculatorService = (CalculatorService)Naming.lookup("//localhost:8099/CalculatorRMIService"); - - // 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)); - - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.java deleted file mode 100644 index ffa40d0234..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServer.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 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; - -/** - * A claculator service server. Starts up the SCA runtime which - * will start listening for RMI service requests. - */ -public class CalculatorServer { - public static void main(String[] args) throws Exception { - System.out.println("Starting of the SCA Calculator Application exposed as RMI Services..."); - String uri = ContributionLocationHelper.getContributionLocation("CalculatorRMIServer.composite"); - Contribution contribution = new Contribution("c1", uri); - Node node = NodeFactory.newInstance().createNode("CalculatorRMIServer.composite", contribution); - node.start(); - System.out.println("... Press Enter to Exit..."); - System.in.read(); - node.stop(); - System.out.println("Exited..."); - System.exit(0); - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index b0a46b6dd0..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorService.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 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 675350860e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.oasisopen.sca.annotation.Reference; - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/DivideService.java deleted file mode 100644 index 835e4fda6d..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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 interface for the divide service - */ -public interface DivideService { - - double divide(double n1, double n2); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 8c33862f6d..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index db568cc762..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index c7fbc73c00..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/SubtractService.java deleted file mode 100644 index 30e4e6a56a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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 subtract service - */ -public interface SubtractService { - - double subtract(double n1, double n2); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 1a7f145ad8..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite deleted file mode 100644 index 02614ad6e1..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/CalculatorRMIServer.composite +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/META-INF/sca-contribution.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 10140b7bc1..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.java deleted file mode 100644 index eb824679a8..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator-rmi-service/src/test/java/calculator/CalculatorRMIServerTestCase.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; - -import static org.junit.Assert.assertEquals; - -import java.rmi.Naming; - -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 shows how to test the Calculator service component. - */ -public class CalculatorRMIServerTestCase { - - private static Node node; - private static CalculatorService calculatorService; - - @BeforeClass - public static void setUp() throws Exception { - String uri = ContributionLocationHelper.getContributionLocation(CalculatorService.class); - Contribution contribution = new Contribution("c1", uri); - node = NodeFactory.newInstance().createNode("CalculatorRMIServer.composite", contribution); - node.start(); - } - - @AfterClass - public static void tearDown() throws Exception { - node.stop(); - } - - @Test - public void testCalculator() throws Exception { - // Calculate - calculatorService = (CalculatorService)Naming.lookup("//localhost:8099/CalculatorRMIService"); - 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/README b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/README deleted file mode 100644 index 56c22d9c89..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/README +++ /dev/null @@ -1,97 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator.jar calculator.CalculatorClient - -and on *nix do - -java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator.jar calculator.CalculatorClient - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/build.xml deleted file mode 100644 index 4411cae659..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/build.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.png b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.png and /dev/null differ diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.svg b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.svg deleted file mode 100644 index 0615925c50..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/pom.xml deleted file mode 100644 index c7a187182c..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-calculator - Apache Tuscany SCA Sample Calculator - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M2-SNAPSHOT - runtime - - - - junit - junit - 4.5 - test - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - calculator.CalculatorClient - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/AddService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/AddServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 03fc56ceb3..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorClient.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 calculator; - -import org.apache.tuscany.sca.node.Client; -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 { - - Node node = NodeFactory.newInstance().createNode(); - - node.start(); - - CalculatorService calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - - // 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorService.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; - - -/** - * 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 17fad7de6b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.oasisopen.sca.annotation.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - 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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/DivideService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/DivideServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/MultiplyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/SubtractService.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/Calculator.composite b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/Calculator.composite deleted file mode 100644 index f67b212d99..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/META-INF/sca-contribution.xml b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 10140b7bc1..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/test/java/calculator/CalculatorTestCase.java b/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 27a424b1cc..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/calculator/src/test/java/calculator/CalculatorTestCase.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; - -import static org.junit.Assert.assertEquals; - -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 org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Scope; - -/** - * This shows how to test the Calculator service component. - */ -@Scope("COMPOSITE") @EagerInit -public class CalculatorTestCase{ - private static Node node; - private static CalculatorService calculatorService; - - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - NodeFactory factory = NodeFactory.newInstance(); - String contribution = ContributionLocationHelper.getContributionLocation(CalculatorClient.class); - node = factory.createNode("Calculator.composite", new Contribution("calculator", contribution)); - node.start(); - - calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent"); - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - node.stop(); - } - - @Test - public void testCalculator() throws Exception { - // Calculate - assertEquals(calculatorService.add(3, 2), 5.0, 0); - assertEquals(calculatorService.subtract(3, 2), 1.0, 0); - assertEquals(calculatorService.multiply(3, 2), 6.0, 0); - assertEquals(calculatorService.divide(3, 2), 1.5, 0); - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/README b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/README deleted file mode 100644 index bf5f500ef3..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/README +++ /dev/null @@ -1,151 +0,0 @@ -Hello World BPEL Sample -====================================== -This sample demonstrates an SCA service implemented by a BPEL process. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory, and do - -ant compile run - -OR if you don't have ant, on Windows do - -mkdir target\classes -mkdir target\wsdl2java-source -java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl -java -cp ..\..\lib\tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl -unzip ..\..\lib\ode-dao-jpa-ojpa-derby-1.1.zip -d target\database -javac -d target\classes -cp target\classes;..\..\lib\tuscany-sca-manifest.jar -sourcepath src\main\java;target\wsdl2java-source -target 1.5 -g -source 1.5 src\main\java\helloworld\BPELClient.java -copy src\main\resources\* target\classes -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\classes;target\database helloworld.BPELClient - -and on *nix do - -mkdir target/classes -mkdir target/wsdl2java-source -java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.sdo.generate.XSD2JavaGenerator -targetDirectory target/wsdl2java-source -prefix HelloWorld -noContainment -noUnsettable src/main/resources/helloworld.wsdl -java -cp ../../lib/tuscany-sca-manifest.jar org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator -targetDirectory target/wsdl2java-source src/main/resources/helloworld.wsdl -unzip ../../lib/ode-dao-jpa-ojpa-derby-1.1.zip -d target/database -javac -d target/classes -cp target/classes;../../lib/tuscany-sca-manifest.jar -sourcepath src/main/java;target/wsdl2java-source -target 1.5 -g -source 1.5 src/main/java/helloworld/BPELClient.java -cp src/main/resources/* target/classes -java -cp ../../lib/tuscany-sca-manifest.jar:target/classes:target/database helloworld.BPELClient - -The sample will start an embedded BPEL engine, deploy a process and invoke it. - -Sample Overview ---------------- -The sample provides a single component that is wired to a service with a -web service binding. - -helloworld-bpel/ - src/ - main/ - java/ - helloworld/ - BPELClient.java - client application for - BEPELHelloWorldComponent - - resources/ - deploy.xml - ODE deployment descriptor - helloworld.bpel - helloworld bpel process - helloworld.componentType - helloworld bpel service description - helloworld.composite - the SCA assembly for this sample - helloworld.wsdl - the service description that describes - the bpel process - log4j.properties - logging configuration - - test/ - java/ - helloworld/ - BPELHelloWorldTestCase.java - JUnit test case - helloworld-bpel.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ - -With the binary distribution the sample can be built and run using Ant as -follows - -cd helloworld-bpel -ant compile -ant run - - -You should see the following output from the run target. - -run: - [java] Starting BPELHelloWorldComponent - [java] >>> Deploying : D:\temp\SCA1.1-RC1\tuscany-sca-1.1-incubating\samples\helloworld-bpel\target\classes - [java] ::arg:::::: - [java] Hello - [java] ::message:: - [java] Hello - [java] Status: RESPONSE - [java] Response: - [java] Hello World - [java] Hello World - [java] Stopping BPELHelloWorldComponent - [java] Stopped !!! - -BUILD SUCCESSFUL -Total time: 36 seconds - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. When using Maven, a simple test is present that exercise -the same logic as the client to invoke the BPEl process. - -cd helloworld-bpel -mvn - -You should see the following output from the test phase. - -- - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running helloworld.BPELHelloWorldTestCase -Starting BPELHelloWorldComponent ->>> Deploying : D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\classes -::arg:::::: -Hello -::message:: -Hello -Status: RESPONSE -Response: -Hello World -Stopping BPELHelloWorldComponent -Stopped !!! -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.656 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -[INFO] [jar:jar] -[INFO] Building jar: D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\sample-helloworld-bpel.jar -[INFO] [install:install] -[INFO] Installing D:\dev\Opensource\Apache\Tuscany\source\java-sca-1.1\samples\helloworld-bpel\target\sample-helloworld-bpel.jar to C:\Documents and Settings\lresend -e\.m2\repository\org\apache\tuscany\sca\sample-helloworld-bpel\1.1-incubating-SNAPSHOT\sample-helloworld-bpel-1.1-incubating-SNAPSHOT.jar -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESSFUL -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 53 seconds -[INFO] Finished at: Sun Jan 13 09:54:39 PST 2008 -[INFO] Final Memory: 24M/43M -[INFO] ------------------------------------------------------------------------ - - -This shows that the Junit test cases have run successfully. diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/build.xml deleted file mode 100644 index 890a6427b8..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/build.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.png b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.png deleted file mode 100644 index 5f53a3c5d1..0000000000 Binary files a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.png and /dev/null differ diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.svg b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.svg deleted file mode 100644 index 5a98f1a07c..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/helloworld-bpel.svg +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldws - - HelloWorldServiceComponent - - HelloWorldWebService - - implementation.bpel helloworld.bpel - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/pom.xml deleted file mode 100644 index a229c3bdc3..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/pom.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-helloworld-bpel - Apache Tuscany SCA Sample HelloWorld BPEL - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-M2-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-ode - 2.0-M2-SNAPSHOT - runtime - - - - - - xerces - xercesImpl - 2.8.1 - - - - junit - junit - 4.5 - test - - - - - - org.codehaus.woodstox - wstx-asl - 3.2.1 - runtime - - - - javax.xml.bind - jaxb-api - 2.1 - compile - - - javax.xml.stream - stax-api - - - - - - com.sun.xml.bind - jaxb-impl - 2.1.7 - runtime - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-surefire-plugin - - 2.3.1 - - false - false - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - test-compile - - unpack - - - - - org.apache.ode - ode-dao-jpa-ojpa-derby - 1.1 - zip - true - ${project.build.directory}/test-classes/ - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java deleted file mode 100644 index e2d69eddf6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * Simple BPEL sample application invoking a helloworld - * - * @version $Rev$ $Date$ - */ -public class BPELClient { - public static void main(String[] args) throws Exception { - - Node node = NodeFactory.newInstance().createNode(); - node.start(); - - Hello bpelService = node.getService(Hello.class, "BPELHelloWorldComponent"); - - String result = bpelService.hello("Hello"); - System.out.println(result); - - node.stop(); - - System.exit(0); - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/Hello.java b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/Hello.java deleted file mode 100644 index ae7be07be6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/java/helloworld/Hello.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Hello { - - String hello(String name); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 8378a15824..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.bpel b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.bpel deleted file mode 100644 index a88aa7960c..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.composite b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.composite deleted file mode 100644 index 91ce1f22d4..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.wsdl b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.wsdl deleted file mode 100644 index 46cf381577..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/log4j.properties b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/log4j.properties deleted file mode 100644 index 8649a71550..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/main/resources/log4j.properties +++ /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. -# - -# Set root logger level to WARN and its only appender to CONSOLE -log4j.rootLogger=OFF, CONSOLE - -# log4j properties to work with commandline tools. -log4j.category.org.mortbay=OFF -log4j.category.org.hibernate.type=OFF -log4j.category.org.objectweb=OFF -log4j.category.org.apache.ode.sql=OFF -log4j.category.org.apache.ode.axis2=OFF -log4j.category.org.apache.ode.bpel.engine=OFF -log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF -log4j.category.org.apache.ode.bpel.epr=OFF -log4j.category.org.apache.openjpa.kernel=OFF - -# Console appender -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%p - %C{1}.%M(%L) | %m%n \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java.FIXME b/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java.FIXME deleted file mode 100644 index 3b85fa85a2..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java.FIXME +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package helloworld; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -/** - * Tests the BPEL service - * - * @version $Rev$ $Date$ - */ -public class BPELHelloWorldTestCase extends TestCase { - - private Node node; - private Hello bpelService; - - /** - * @throws java.lang.Exception - */ - @Override - protected void setUp() throws Exception { - - node = NodeFactory.newInstance().createNode(); - node.start(); - - bpelService = node.getService(Hello.class, "BPELHelloWorldComponent"); - } - - /** - * @throws java.lang.Exception - */ - @Override - protected void tearDown() throws Exception { - node.stop(); - } - - public void testInvoke() throws Exception { - String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/README b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/README deleted file mode 100644 index 28eccbdebb..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/README +++ /dev/null @@ -1,96 +0,0 @@ -Calculator Sample -================= -This sample implements a simple calculator using SCA components. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -jar ..\..\features\tuscany-sca-equinox-manifest.jar -composite Calculator.composite -config ..\..\features\configuration\ -ttl 0 target\sample-implementation-java-calculator.jar -and on *nix do - -java -jar ../../features/tuscany-sca-equinox-manifest.jar -composite Calculator.composite -config ../../features/configuration/ -ttl 0 target/sample-implementation-java-calculator.jar - -Sample Overview ---------------- -The sample provides a single calculator service with a default SCA (java) -binding. The CalculatorClient exercises this interface by calling add, -subtract, multiply and divide operations. This results in messages passing to -the appropriate components in the composite across the local wires. - -calculator/ - src/ - main/ - java/ - calculator/ - CalculatorService.java - the first component, calls +-/* as - appropriate - CalculatorServiceImpl.java - AddService.java - adds two numbers - AddServiceImpl.java - SubtractService.java - subtracts one number from another - SubtractServiceImpl.java - MultiplyService.java - multiplies two numbers - MultiplyServiceImpl.java - DivideService.java - divides one number by another - DivideServiceImpl.java - CalculatorClient.java - starts the SCA Runtime and - deploys the Calculator.composite. - It then calls the deployed Calculator - Components services - resources/ - Calculator.composite - the SCA assembly for this sample - test/ - java/ - calculator/ - CalculatorTestCase.java - JUnit test case - calculator.png - a pictorial representation of the sample - .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant as -follows - -cd calculator -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 3 + 2=5.0 - [java] 3 - 2=1.0 - [java] 3 * 2=6.0 - [java] 3 / 2=1.5 - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd calculator -mvn - -You should see the following output from the test phase. - -------------------------------------------------------- - T E S T S -------------------------------------------------------- -Running calculator.CalculatorTestCase -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.272 sec - -Results : - -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 - -This shows that the Junit test cases have run successfully. diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/build.xml b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/build.xml deleted file mode 100644 index b95847f600..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.png b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.png deleted file mode 100644 index 995a57b1fd..0000000000 Binary files a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.png and /dev/null differ diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.svg b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.svg deleted file mode 100644 index af34f07e04..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/calculator.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - Calculator - - CalculatorServiceComponent - - - CalculatorService - AddServiceComponent - - SubtractServiceComponent - - MultiplyServiceComponent - - DivideServiceComponent - addService - subtractService - multiplyService - divideService - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/pom.xml deleted file mode 100644 index e27807f205..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - sample-implementation-java-calculator - Apache Tuscany SCA Sample Implementation Java Calculator - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-feature-api - pom - 2.0-M2-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-feature-core - pom - 2.0-M2-SNAPSHOT - - - - junit - junit - 4.5 - test - - - - - ${artifactId} - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/AddService.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/AddService.java deleted file mode 100644 index 188451ebac..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/AddServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/AddServiceImpl.java deleted file mode 100644 index 7ca8fb04b5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorClient.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorClient.java deleted file mode 100644 index 84c98d7f70..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorClient.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package calculator; - -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Scope; - -/** - * This client program shows how to create an SCA runtime, start it, - * and locate and invoke a SCA component - */ -@Scope("COMPOSITE") @EagerInit -public class CalculatorClient { - - private CalculatorService calculatorService; - - @Reference - public void setCalculatorService(CalculatorService calculatorService) { - this.calculatorService = calculatorService; - } - - @Init - public void calculate() { - - // Calculate - System.out.println("SCA API ClassLoader: " + print(Reference.class.getClassLoader())); - 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)); - } - - private static String print(ClassLoader cl) { - StringBuffer buf = new StringBuffer(); - for (; cl != null;) { - buf.append(cl.toString()); - buf.append(' '); - cl = cl.getParent(); - } - return buf.toString(); - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorService.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 031fa8b912..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorService.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; - - -/** - * 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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorServiceImpl.java deleted file mode 100644 index 17fad7de6b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/CalculatorServiceImpl.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 calculator; - -import org.oasisopen.sca.annotation.Reference; - - -/** - * An implementation of the Calculator service. - */ -public class CalculatorServiceImpl implements CalculatorService { - - private AddService addService; - private SubtractService subtractService; - private MultiplyService multiplyService; - private DivideService divideService; - - @Reference - public void setAddService(AddService addService) { - this.addService = addService; - } - - @Reference - public void setSubtractService(SubtractService subtractService) { - this.subtractService = subtractService; - } - - @Reference - public void setDivideService(DivideService divideService) { - this.divideService = divideService; - } - - @Reference - 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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/DivideService.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/DivideService.java deleted file mode 100644 index 30d248208b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/DivideServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/DivideServiceImpl.java deleted file mode 100644 index 1323edf55a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/MultiplyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/MultiplyService.java deleted file mode 100644 index 5290605938..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/MultiplyServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/MultiplyServiceImpl.java deleted file mode 100644 index 91b803bc9e..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/SubtractService.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/SubtractService.java deleted file mode 100644 index bf0d1882b6..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/SubtractServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/java/calculator/SubtractServiceImpl.java deleted file mode 100644 index 58cc4a3547..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/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/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/resources/Calculator.composite b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/resources/Calculator.composite deleted file mode 100644 index 9450558145..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/main/resources/Calculator.composite +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/test/java/calculator/CalculatorTestCase.java b/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/test/java/calculator/CalculatorTestCase.java deleted file mode 100644 index 461c970373..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/implementation-java-calculator/src/test/java/calculator/CalculatorTestCase.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 calculator; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.equinox.launcher.Contribution; -import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper; -import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * This shows how to test the Calculator composition. - */ -public class CalculatorTestCase { - - private static NodeLauncher launcher; - private static Node node; - private static String status = "Sample Success"; - - public static void main(String[] args) throws Exception { - setUpBeforeClass(); - tearDownAfterClass(); - } - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - launcher = NodeLauncher.newInstance(); - String location = ContributionLocationHelper.getContributionLocation(CalculatorClient.class); - node = launcher.createNode("Calculator.composite", new Contribution("test", location)); - - try { - node.start(); - } catch (Exception ex) { - status = ex.toString(); - System.out.println(status); - } - } - - @AfterClass - public static void tearDownAfterClass() throws Exception { - if (node != null) { - node.stop(); - node.destroy(); - } - if (launcher != null) { - launcher.destroy(); - } - } - - @Test - public void testSample() throws Exception { - Assert.assertEquals("Sample Success", status); - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/logging.properties b/sandbox/ant/sca/branches/2.0-M2/samples/logging.properties deleted file mode 100644 index cf452e7812..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/logging.properties +++ /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. -# - -handlers= java.util.logging.ConsoleHandler - -.level = INFO - -java.util.logging.ConsoleHandler.level = FINE -java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter - -org.apache.tuscany.sca.level = INFO diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/pom.xml deleted file mode 100644 index f302c5d3a0..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../pom.xml - - tuscany-samples - pom - Apache Tuscany SCA Samples - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - default - - true - - - helloworld-bpel - calculator - calculator-equinox - calculator-osgi - calculator-rmi-reference - calculator-rmi-service - - implementation-java-calculator - binding-ws-calculator - - - webapps/helloworld - webapps/helloworld-jsp - webapps/helloworld-stripes - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/pom.xml deleted file mode 100644 index 09bb3ebd5b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-SNAPSHOT - ../../pom.xml - - - helloworld-jsf - Apache Tuscany SCA Sample Helloworld JSF - war - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 2.0-SNAPSHOT - runtime - - - - org.apache.myfaces.core - myfaces-impl - 1.2.3 - runtime - - - - - - ${artifactId} - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloWorldController.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloWorldController.java deleted file mode 100644 index 931c1ad820..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloWorldController.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 sample; - -import org.oasisopen.sca.annotation.Reference; - -/** - * - */ -public class HelloWorldController { - - @Reference - protected HelloworldService service; - - private String name; - - public HelloWorldController() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - /** - * Method that is backed to a submit button of a form. - */ - public String send() { - if (service == null) { - name = "reference not injected!"; - } else { - name = service.sayHello(name); - } - return "success"; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloworldService.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 123774b936..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/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 sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloworldServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index 6db7e93188..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/java/sample/HelloworldServiceImpl.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 sample; - -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/faces-config.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/faces-config.xml deleted file mode 100644 index 3a51ed2623..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/faces-config.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - helloWorld - sample.HelloWorldController - request - - - - - /helloWorld.jsp - - success - /page2.jsp - - - - - - /page2.jsp - - back - /helloWorld.jsp - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.composite b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 7e2ca0a158..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 7fd6bd6b6b..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - MyProject web.xml - - - - State saving method: "client" or "server" (= default) - See JSF Specification 2.5.3 - javax.faces.STATE_SAVING_METHOD - client - - - Only applicable if state saving method is "server" (= default). - Defines the amount (default = 20) of the latest views are stored in session. - org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION - 20 - - - Only applicable if state saving method is "server" (= default). - If true (default) the state will be serialized to a byte stream before it - is written to the session. - If false the state will not be serialized to a byte stream. - org.apache.myfaces.SERIALIZE_STATE_IN_SESSION - true - - - Only applicable if state saving method is "server" (= default) and if - org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default) - If true (default) the serialized state will be compressed before it - is written to the session. If false the state will not be compressed. - org.apache.myfaces.COMPRESS_STATE_IN_SESSION - true - - - This parameter tells MyFaces if javascript code should be allowed in the - rendered HTML output. - If javascript is allowed, command_link anchors will have javascript code - that submits the corresponding form. - If javascript is not allowed, the state saving info and nested parameters - will be added as url parameters. - Default: "true" - org.apache.myfaces.ALLOW_JAVASCRIPT - true - - - org.apache.myfaces.DETECT_JAVASCRIPT - false - - - If true, rendered HTML code will be formatted, so that it is "human readable". - i.e. additional line separators and whitespace will be written, that do not - influence the HTML code. - Default: "true" - org.apache.myfaces.PRETTY_HTML - true - - - If true, a javascript function will be rendered that is able to restore the - former vertical scroll on every request. Convenient feature if you have pages - with long lists and you do not want the browser page to always jump to the top - if you trigger a link or button action that stays on the same page. - Default: "false" - org.apache.myfaces.AUTO_SCROLL - true - - - - Used for encrypting view state. Only relevant for client side - state saving. See MyFaces wiki/web site documentation for instructions - on how to configure an application for diffenent encryption strengths. - - org.apache.myfaces.SECRET - NzY1NDMyMTA= - - - - - Validate managed beans, navigation rules and ensure that forms are not nested. - - org.apache.myfaces.VALIDATE - true - - - - - Treat readonly same as if disabled attribute was set for select elements. - - org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS - true - - - - - Use the defined class as the class which will be called when a resource is added to the - ExtensionFilter handling. Using StreamingAddResource here helps with performance. If you want to add - custom components and want to use the ExtensionFilter, you need to provide your custom implementation here. - - org.apache.myfaces.ADD_RESOURCE_CLASS - org.apache.myfaces.renderkit.html.util.DefaultAddResource - - - - - Virtual path in the URL which triggers loading of resources for the MyFaces extended components - in the ExtensionFilter. - - org.apache.myfaces.RESOURCE_VIRTUAL_PATH - /faces/myFacesExtensionResource - - - - - Check if the extensions-filter has been properly configured. - - org.apache.myfaces.CHECK_EXTENSIONS_FILTER - true - - - - - Define partial state saving as true/false. - - javax.faces.PARTIAL_STATE_SAVING_METHOD - false - - - - - org.apache.myfaces.webapp.StartupServletContextListener - - - - - Faces Servlet - javax.faces.webapp.FacesServlet - 1 - - - - - Faces Servlet - *.jsf - - - - - index.jsp - index.html - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/helloWorld.jsp b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/helloWorld.jsp deleted file mode 100644 index 189c142c99..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/helloWorld.jsp +++ /dev/null @@ -1,40 +0,0 @@ - - -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> - - - - Apache Tuscany Helloworld JSF sample - - -

Apache Tuscany Helloworld JSF sample

- - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/index.jsp b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/index.jsp deleted file mode 100644 index 5ca296e115..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/index.jsp +++ /dev/null @@ -1,23 +0,0 @@ - - -<%@ page session="false"%> -<% -response.sendRedirect("helloWorld.jsf"); -%> diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/page2.jsp b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/page2.jsp deleted file mode 100644 index 89259021c7..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsf/src/main/webapp/page2.jsp +++ /dev/null @@ -1,38 +0,0 @@ - - -<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> -<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> - - - Apache Tuscany Helloworld JSF sample - - -

Apache Tuscany Helloworld JSF sample

- - - -
- - - -
-
- - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/pom.xml deleted file mode 100644 index 60a28eeac5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - - helloworld-jsp - war - Apache Tuscany SCA Sample Helloworld JSP - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M2-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 2.0-M2-SNAPSHOT - runtime - - - - - - ${artifactId} - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/HelloworldService.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 123774b936..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/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 sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index 66cef71a25..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/java/sample/HelloworldServiceImpl.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 sample; - - -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.composite b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 56ed55b2d5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a5b03d4904..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Apache Tuscany Helloworld JSP Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.jsp - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/hello.jsp b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/hello.jsp deleted file mode 100644 index ffd01cca73..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-jsp/src/main/webapp/hello.jsp +++ /dev/null @@ -1,37 +0,0 @@ - - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> - - - - - - -

Apache Tuscany Helloworld JSP Sample

- - Calling HelloworldService sayHello("world") returns: - -

- - <%= service.sayHello("world") %> - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/pom.xml deleted file mode 100644 index fc6358744a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - - helloworld-stripes - war - Apache Tuscany SCA Sample Helloworld using Stripes - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M2-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-stripes - 2.0-M2-SNAPSHOT - - - - - net.sourceforge.stripes - stripes - 1.5 - - - taglibs - standard - 1.1.2 - - - - - - ${artifactId} - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/BaseActionBean.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/BaseActionBean.java deleted file mode 100644 index 901e3ff1b8..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/BaseActionBean.java +++ /dev/null @@ -1,15 +0,0 @@ -package mystripes.action; - -import net.sourceforge.stripes.action.ActionBean; -import net.sourceforge.stripes.action.ActionBeanContext; - -public class BaseActionBean implements ActionBean { - private ActionBeanContext context; - - public ActionBeanContext getContext() { - return context; - } - public void setContext(ActionBeanContext context) { - this.context = context; - } -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/HomeActionBean.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/HomeActionBean.java deleted file mode 100644 index acbe5456ea..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/mystripes/action/HomeActionBean.java +++ /dev/null @@ -1,27 +0,0 @@ -package mystripes.action; - -import net.sourceforge.stripes.action.DefaultHandler; -import net.sourceforge.stripes.action.ForwardResolution; -import net.sourceforge.stripes.action.Resolution; -import net.sourceforge.stripes.action.UrlBinding; - -import org.oasisopen.sca.annotation.Reference; - -import sample.HelloworldService; - -@UrlBinding("/Home.htm") -public class HomeActionBean extends BaseActionBean { - - @Reference - HelloworldService service; - - @DefaultHandler - public Resolution view() { - return new ForwardResolution("/WEB-INF/jsp/home.jsp"); - } - - public String getHello() { - return service.sayHello("world"); - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/HelloworldService.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 123774b936..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/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 sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/HelloworldServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index 66cef71a25..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/java/sample/HelloworldServiceImpl.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 sample; - - -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/StripesResources.properties b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/StripesResources.properties deleted file mode 100644 index a23399569a..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/StripesResources.properties +++ /dev/null @@ -1,57 +0,0 @@ - -# Resource strings used by the tag when there are no nested tags -stripes.errors.header=

Please fix the following errors:
    -stripes.errors.beforeError=
  1. -stripes.errors.afterError=
  2. -stripes.errors.footer=
- -# Resource strings used by the tag when displaying errors for a -# specific field (e.g. ). If not supplied the -# values above will be used instead. -stripes.fieldErrors.header= -stripes.fieldErrors.beforeError= -stripes.fieldErrors.afterError=
-stripes.fieldErrors.footer= - -# Resource strings used by the stripes:messages tag -stripes.messages.header=
    -stripes.messages.beforeMessage=
  • -stripes.messages.afterMessage=
  • -stripes.messages.footer=
- -# Validation error messages produced by Stripes' built-in converter classes. These -# are default error messages and can be overridden on per-field and per-form levels. -# Using the 'invalidNumber' error for a field 'age' of a form posting to -# '/user/Profile.action', the keys looked for (in order) would be: -# 1: /user/Profile.action.age.invalidNumber -# 2: /user/Profile.action.age.errorMessage -# 3: age.errorMessage -# 4: /user/Profile.action.invalidNumber -# 5: converter.number.invalidNumber -converter.number.invalidNumber=The value ({1}) entered in field {0} must be a valid number -converter.byte.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} -converter.short.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} -converter.integer.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} -converter.float.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} -converter.enum.notAnEnumeratedValue=The value "{1}" is not a valid value for field {0} -converter.date.invalidDate=The value ({1}) entered in field {0} must be a valid date -converter.email.invalidEmail=The value ({1}) entered is not a valid email address -converter.creditCard.invalidCreditCard=The value ({1}) entered is not a valid credit card number - -# Validation error messages produced by Stripes' annotation based validations. These -# are default error messages and can be overridden on per-field and per-form levels. -# Using the 'valueNotPresent' required field error for a field 'username' of a form -# posting to '/user/Register.action', the keys looked for (in order) would be: -# 1: /user/Register.action.username.valueNotPresent -# 2: /user/Register.action.username.errorMessage -# 3: username.errorMessage -# 4: /user/Register.action.valueNotPresent -# 5: validation.required.valueNotPresent -validation.required.valueNotPresent={0} is a required field -validation.minlength.valueTooShort={0} must be at least {2} characters long -validation.maxlength.valueTooLong={0} must be no more than {2} characters long -validation.minvalue.valueBelowMinimum=The minimum allowed value for {0} is {2} -validation.maxvalue.valueAboveMaximum=The maximum allowed value for {0} is {2} -validation.mask.valueDoesNotMatch={1} is not a valid {0} -validation.expression.valueFailedExpression=The value supplied ({1}) for field {0} is invalid -validation.file.postBodyTooBig=Total upload size of {3} KB exceeds the maximum size of {2} KB diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/log4j.properties b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/log4j.properties deleted file mode 100644 index 77fa204a15..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/resources/log4j.properties +++ /dev/null @@ -1,31 +0,0 @@ -# log4j.properties - -# Set up a logger to the console -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n - -# Use this to only see log messages beyond a certain threshold in the console -#log4j.appender.stdout.Threshold=WARN - -# Set up a logger to a log file -log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n -log4j.appender.logfile.File=${user.home}/stripesquick.log -log4j.appender.logfile.DatePattern='.'yyyy-MM-dd - -# Use this to only see log messages beyond a certain threshold in the log file -#log4j.appender.logfile.Threshold=WARN - -# Logger settings -log4j.rootLogger=INFO, stdout, logfile - -# Valid levels are TRACE, DEBUG, INFO, WARN, ERROR, FATAL -# Change to TRACE or DEBUG to see more log messages -log4j.logger.net.sourceforge.stripes=WARN -log4j.logger.org.stripesbook.quickstart=INFO -log4j.logger.org.mortbay.log=INFO -log4j.logger.org=WARN -log4j.logger.com=WARN -log4j.logger.net=WARN diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/home.jsp b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/home.jsp deleted file mode 100644 index ea3fc55714..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/home.jsp +++ /dev/null @@ -1,8 +0,0 @@ -<%@ include file="/WEB-INF/jsp/taglibs.jsp" %> - - - -

sayHello returns: ${actionBean.hello}

-

Congratulations, you've set up a Stripes SCA project!

-
-
diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/layout.jsp b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/layout.jsp deleted file mode 100644 index 72e696ecb8..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/layout.jsp +++ /dev/null @@ -1,21 +0,0 @@ -<%@ include file="/WEB-INF/jsp/taglibs.jsp" %> - - - - - - - ${title} - - - - - -
- - -
- - - -
\ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/taglibs.jsp b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/taglibs.jsp deleted file mode 100644 index 4e38b14e9f..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/jsp/taglibs.jsp +++ /dev/null @@ -1,11 +0,0 @@ -<%-- Stripes TLD --%> -<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %> -<%@ taglib prefix="sdyn" uri="http://stripes.sourceforge.net/stripes-dynattr.tld" %> - -<%-- JSTL TLDs --%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> - -<%-- This is so that you can conveniently refer to the context path with ${contextPath} --%> - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.composite b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 56ed55b2d5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 0a16144519..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Apache Tuscany Helloworld Stripes Sample - - - org.apache.tuscany.sca.host.webapp.TuscanyContextListener - - - - StripesFilter - net.sourceforge.stripes.controller.StripesFilter - - ActionResolver.Packages - mystripes.action - - - Extension.Packages - org.apache.tuscany.sca.stripes - - - - - DispatcherServlet - net.sourceforge.stripes.controller.DispatcherServlet - 1 - - - - StripesFilter - DispatcherServlet - REQUEST - FORWARD - - - - DispatcherServlet - *.htm - - - - index.html - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/index.html b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/index.html deleted file mode 100644 index 2b070f4ce0..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-stripes/src/main/webapp/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/pom.xml deleted file mode 100644 index b2635f9b45..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-SNAPSHOT - ../../pom.xml - - - helloworld-wicket - war - Apache Tuscany SCA Sample Helloworld using Wicket - - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-SNAPSHOT - - - org.apache.tuscany.sca - tuscany-wicket - 2.0-SNAPSHOT - - - javax.servlet - servlet-api - 2.5 - provided - - - - - org.apache.wicket - wicket - 1.4-rc2 - - - org.slf4j - slf4j-log4j12 - 1.4.2 - - - log4j - log4j - 1.2.14 - - - - - - ${artifactId} - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/HelloworldService.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 123774b936..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/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 sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/HelloworldServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index 66cef71a25..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/HelloworldServiceImpl.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 sample; - - -public class HelloworldServiceImpl implements HelloworldService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.html b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.html deleted file mode 100644 index fd60771d20..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Wicket Examples - guice - - - -

- This page uses Google Guice. - There is a service interface called IMyService, with an implementation POJO called MyService. - Guice is used to wire the implementation into the Page using an @Inject annotation. You can use this - annotation on the fields of any Component subclass. -

-

- The value of the Label component below will be updated with the return value from one of the service's methods when you click the link. -

-
-
- Value: Message goes here -
- To update the label above, click here. -
-
-

- The wicket-guice project will take care of proxying the injected beans so that your pages can be serialized safely. - To configure your application for Guice injection, see the javadoc for GuiceComponentInjector. -

- - - \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.java deleted file mode 100644 index 644d6add49..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/HomePage.java +++ /dev/null @@ -1,48 +0,0 @@ -package sample.wicket; - -import org.apache.wicket.markup.html.WebPage; -import org.apache.wicket.markup.html.basic.Label; -import org.apache.wicket.markup.html.link.Link; -import org.apache.wicket.model.AbstractReadOnlyModel; -import org.oasisopen.sca.annotation.Reference; - -/** - * Everybody's favorite example (Hello World), modified to use Guice. - * - * @author Alastair Maw - */ -public class HomePage extends WebPage -{ - @Reference - IMyService service; - - private String labelValue = ""; - - /** - * Constructor - */ - public HomePage() - { - add(new Link("link") - { - /** - * @see org.apache.wicket.markup.html.link.Link#onClick() - */ - @Override - public void onClick() - { - labelValue = service.getHelloWorldText(); - } - }); - add(new Label("message", new AbstractReadOnlyModel() - { - - @Override - public String getObject() - { - return labelValue; - } - - })); - } -} \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/IMyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/IMyService.java deleted file mode 100644 index 4b49225748..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/IMyService.java +++ /dev/null @@ -1,17 +0,0 @@ -package sample.wicket; - - -/** - * Service interface for a simple "Hello World" app. - * - * @author Alastair Maw - */ -public interface IMyService -{ - /** - * Retrieves the text to say "Hello World". - * - * @return "Hello World" - */ - public String getHelloWorldText(); -} \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/MyService.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/MyService.java deleted file mode 100644 index 05998ff74f..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/MyService.java +++ /dev/null @@ -1,20 +0,0 @@ -package sample.wicket; - - -/** - * Implementation of IService. - * - * @author Alastair Maw - */ -public class MyService implements IMyService -{ - - /** - * @see org.apache.wicket.examples.guice.service.IMyService#getHelloWorldText() - */ - public String getHelloWorldText() - { - return "Hello World"; - } - -} \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/WicketApplication.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/WicketApplication.java deleted file mode 100644 index 1d86f1ee39..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/java/sample/wicket/WicketApplication.java +++ /dev/null @@ -1,29 +0,0 @@ -package sample.wicket; - -import org.apache.wicket.Page; -import org.apache.wicket.protocol.http.WebApplication; -import org.apache.tuscany.sca.wicket.TuscanyComponentInjector;; - -/** - * Application object for your web application. If you want to run this application without deploying, run the Start class. - * - * @see com.mycompany.Start#main(String[]) - */ -public class WicketApplication extends WebApplication -{ - - @Override - protected void init() - { - addComponentInstantiationListener(new TuscanyComponentInjector(this)); - } - - /** - * @see org.apache.wicket.Application#getHomePage() - */ - @Override - public Class< ? extends Page> getHomePage() - { - return HomePage.class; - } -} \ No newline at end of file diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/resources/log4j.properties b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/resources/log4j.properties deleted file mode 100644 index 05cd58a3bb..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/resources/log4j.properties +++ /dev/null @@ -1,12 +0,0 @@ -log4j.appender.Stdout=org.apache.log4j.ConsoleAppender -log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n - -log4j.rootLogger=INFO,Stdout - -log4j.logger.org.apache.wicket=INFO -log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO -log4j.logger.org.apache.wicket.version=INFO -log4j.logger.org.apache.wicket.RequestCycle=INFO - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.composite b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 7e2ca0a158..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 7b8490b2be..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld-wicket/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - Apache Tuscany Helloworld Wicket Sample - - - org.apache.tuscany.sca.host.webapp.TuscanyContextListener - - - - - - wicket.tuscany - org.apache.wicket.protocol.http.WicketFilter - - applicationClassName - sample.wicket.WicketApplication - - - - - wicket.tuscany - /* - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/pom.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/pom.xml deleted file mode 100644 index 979b19ecd5..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-M2-SNAPSHOT - ../../pom.xml - - - helloworld - Apache Tuscany SCA Sample Helloworld - war - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-M2-SNAPSHOT - compile - - - - org.apache.tuscany.sca - tuscany-host-webapp - 2.0-M2-SNAPSHOT - runtime - - - - - - ${artifactId} - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/HelloworldService.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/HelloworldService.java deleted file mode 100644 index 123774b936..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/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 sample; - -public interface HelloworldService { - - String sayHello(String name); - -} diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/HelloworldServiceImpl.java b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/HelloworldServiceImpl.java deleted file mode 100644 index 010ca34f00..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/java/sample/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 sample; - -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/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.composite b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index f0609d9eb9..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.xml b/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f13afbfb74..0000000000 --- a/sandbox/ant/sca/branches/2.0-M2/samples/webapps/helloworld/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - Apache Tuscany Helloworld Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - -- cgit v1.2.3