From 9c14ddd98774833f3b3c6817f62b59f8bf3fc432 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 10 Feb 2011 08:53:33 +0000 Subject: Remove samples subfolder as its now in contrib and unreleased git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1069286 13f79535-47bb-0310-9956-ffa450edef68 --- .../samples/getting-started/callback-api/pom.xml | 51 -------- .../src/main/java/sample/CallBack.java | 33 ----- .../callback-api/src/main/java/sample/Client.java | 28 ---- .../src/main/java/sample/ClientImpl.java | 108 ---------------- .../src/main/java/sample/Launcher.java | 60 --------- .../callback-api/src/main/java/sample/Service.java | 36 ------ .../src/main/java/sample/ServiceImpl.java | 96 -------------- .../src/main/resources/CallBackApi.composite | 33 ----- .../main/resources/META-INF/sca-contribution.xml | 23 ---- .../samples/getting-started/files/helloworld.cmds | 19 --- .../samples/getting-started/files/helloworld.xml | 27 ---- .../getting-started/files/helloworldws.composite | 32 ----- .../getting-started/files/new-sca-contribution.xml | 27 ---- .../samples/getting-started/files/scdl-include.xml | 28 ---- .../samples/getting-started/files/wsClient.html | 143 --------------------- .../getting-started/helloworld-contribution/README | 42 ------ .../helloworld-contribution/pom.xml | 86 ------------- .../src/main/java/sample/Helloworld.java | 28 ---- .../src/main/java/sample/HelloworldImpl.java | 36 ------ .../main/resources/META-INF/sca-contribution.xml | 25 ---- .../src/main/resources/helloworld.composite | 29 ----- .../src/test/java/sample/HelloworldTestCase.java | 48 ------- .../getting-started/helloworld-webapp/README | 7 - .../getting-started/helloworld-webapp/pom.xml | 120 ----------------- .../src/main/java/sample/Helloworld.java | 28 ---- .../src/main/webapp/WEB-INF/web.composite | 30 ----- .../src/main/webapp/WEB-INF/web.xml | 41 ------ .../helloworld-webapp/src/main/webapp/hello.jsp | 37 ------ .../src/test/java/itest/Helloworld.java | 27 ---- .../test/java/itest/HelloworldTestCaseFIXME.java | 44 ------- .../src/test/resources/test-web.xml | 30 ----- sca-java-2.x/trunk/samples/getting-started/pom.xml | 47 ------- .../samples/getting-started/sca-scopes/pom.xml | 51 -------- .../sca-scopes/src/main/java/sample/Client.java | 25 ---- .../src/main/java/sample/ClientImpl.java | 54 -------- .../src/main/java/sample/CompositeService.java | 27 ---- .../src/main/java/sample/CompositeServiceImpl.java | 38 ------ .../sca-scopes/src/main/java/sample/Launcher.java | 56 -------- .../src/main/java/sample/StatelessService.java | 28 ---- .../src/main/java/sample/StatelessServiceImpl.java | 37 ------ .../sca-scopes/src/main/resources/scopes.composite | 38 ------ .../scdl-include-contribution/README | 7 - .../scdl-include-contribution/pom.xml | 76 ----------- .../main/resources/META-INF/sca-contribution.xml | 26 ---- .../src/main/resources/scdl-include.composite | 30 ----- 45 files changed, 1942 deletions(-) delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/pom.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/CallBack.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Client.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ClientImpl.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Launcher.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Service.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ServiceImpl.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/CallBackApi.composite delete mode 100644 sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/files/helloworld.cmds delete mode 100644 sca-java-2.x/trunk/samples/getting-started/files/helloworld.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/files/helloworldws.composite delete mode 100644 sca-java-2.x/trunk/samples/getting-started/files/new-sca-contribution.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/files/scdl-include.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/files/wsClient.html delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/README delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/pom.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/README delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/pom.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/hello.jsp delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/Helloworld.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCaseFIXME.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/pom.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/pom.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Client.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/ClientImpl.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeService.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeServiceImpl.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Launcher.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessService.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessServiceImpl.java delete mode 100644 sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/resources/scopes.composite delete mode 100644 sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/README delete mode 100644 sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/pom.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/scdl-include.composite (limited to 'sca-java-2.x/trunk/samples') diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/pom.xml b/sca-java-2.x/trunk/samples/getting-started/callback-api/pom.xml deleted file mode 100644 index a87560b9f2..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-SNAPSHOT - ../../pom.xml - - sample-callback-api-contribution - Apache Tuscany SCA Sample Callback API Contribution - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/CallBack.java b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/CallBack.java deleted file mode 100644 index 16e4297e9d..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/CallBack.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * The callback interface. - */ -@Remotable -public interface CallBack { - - void callBackMessage(String aString); - - void callBackIncrement(); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Client.java b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Client.java deleted file mode 100644 index 7e0709e660..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Client.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; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Client { - - void run(); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ClientImpl.java b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ClientImpl.java deleted file mode 100644 index 01219aa608..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ClientImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import org.oasisopen.sca.annotation.Reference; -import org.oasisopen.sca.annotation.Service; - -@Service(Client.class) -public class ClientImpl implements Client, CallBack { - - public static final String DELIMITER = "\n----------------------------"; - - @Reference - protected sample.Service service; - - private static int callBackCount = 0; - - /** - * This function prints the message received from the service - * implementation. - * - * @param String the message received from the service - */ - public void callBackMessage(String aString) { - System.out.println("ClientImpl - Received callback message: " + aString); - } - - /** - * This function increments the callBackCount variable when called from the - * service implementation. - */ - public void callBackIncrement() { - System.out.println("ClientImpl - Received increment callback"); - callBackCount++; - System.out.println("ClientImpl - Callback counter incremented to : " + getCallBackCount()); - } - - /** - * This method runs different kinds of service calls implying callbacks. - */ - public void run() { - simpleCallBack(); - simpleCallBackByRef(); - noCallBack(); - multipleCallBack(); - } - - /** - * The basic callback where the target calls back prior to returning to the - * client. - */ - private void simpleCallBack() { - System.out.println(DELIMITER + "\nSimple callback" + DELIMITER); - service.knockKnock("Knock Knock"); - } - - /** - * The basic callback where the target calls back prior to returning to the - * client. - */ - private void simpleCallBackByRef() { - System.out.println(DELIMITER + "\nSimple callback by reference" + DELIMITER); - service.knockKnockByRef("Knock Knock by reference"); - } - - /** - * The basic callback where the target does not call back to the client. - */ - private void noCallBack() { - System.out.println(DELIMITER + "\nNo callback" + DELIMITER); - service.noCallBack("No Reply Desired"); - } - - /** - * The basic callback where the target calls back multiple times to the - * client. - */ - private void multipleCallBack() { - System.out.println(DELIMITER + "\nMultiple callbacks" + DELIMITER); - service.multiCallBack("Call me back 3 times"); - } - - /** - * This function returns the callBackCount variable. - * - * @return Integer the callBackCount variable - */ - public int getCallBackCount() { - return callBackCount; - } - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Launcher.java b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Launcher.java deleted file mode 100644 index fa1a59d726..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Launcher.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package sample; - -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 class starts the Tuscany Runtime and runs the client calls to the - * service. - */ -public class Launcher { - - public static void main(String[] args) { - Node node = startRuntime(); - Client client = node.getService(Client.class, "Client"); - client.run(); - stopRuntime(node); - } - - /** - * Starts a Tuscany node with the predefined contribution. - * - * @return the running node - */ - private static Node startRuntime() { - String location = ContributionLocationHelper.getContributionLocation("CallBackApi.composite"); - Node node = NodeFactory.newInstance().createNode("CallBackApi.composite", new Contribution("c1", location)); - node.start(); - return node; - } - - /** - * Stops a Tuscany node. - * - * @param node the node to stop - */ - private static void stopRuntime(Node node) { - node.stop(); - } -} diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Service.java b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Service.java deleted file mode 100644 index 6723af2adf..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/Service.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 sample; - -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -@Callback(CallBack.class) -public interface Service { - - void knockKnock(String aString); - - void knockKnockByRef(String aString); - - void noCallBack(String aString); - - void multiCallBack(String aString); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ServiceImpl.java b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ServiceImpl.java deleted file mode 100644 index 4850f434ff..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/java/sample/ServiceImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES 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.ComponentContext; -import org.oasisopen.sca.ServiceReference; -import org.oasisopen.sca.annotation.Callback; -import org.oasisopen.sca.annotation.Context; -import org.oasisopen.sca.annotation.Service; - -@Service(sample.Service.class) -public class ServiceImpl implements sample.Service { - - public static final String MESSAGE_RECEIVED = "ServiceImpl - Received message: "; - - @Context - protected ComponentContext componentContext; - - @Callback - protected ServiceReference callbackRef; - - /** - * This function gets an object of ServiceImpl by calling - * getCallBackInterface function and calls the callBackMessage function. - * - * @param aString String passed by a function call - */ - public void knockKnock(String aString) { - System.out.println(MESSAGE_RECEIVED + aString); - CallBack callback = this.getCallBackFromComponentContext(); - callback.callBackMessage("Who's There"); - } - - /** - * This function calls the callBackMessage function. The reference to this - * function is received from the callback reference to the Service class. - * - * @param aString String passed by a function call - */ - public void knockKnockByRef(String aString) { - System.out.println(MESSAGE_RECEIVED + aString); - callbackRef.getService().callBackMessage("Who's There"); - } - - /** - * This function gets an object of ServiceImpl by calling - * getCallBackInterface function. This function then places multiple - * callbacks using the callbackIncrement function defined in the callback - * implementation. - * - * @param aString String passed by a function call - */ - public void multiCallBack(String aString) { - CallBack callback = this.getCallBackFromComponentContext(); - System.out.println(MESSAGE_RECEIVED + aString); - callback.callBackIncrement(); - callback.callBackIncrement(); - callback.callBackIncrement(); - } - - /** - * This function does not callBack any function. - * - * @param aString String passed by a function call - */ - public void noCallBack(String aString) { - System.out.println(MESSAGE_RECEIVED + aString); - } - - /** - * This function gets an object of ServiceImpl from the present - * componentContext. - * - * @return the callback - */ - private CallBack getCallBackFromComponentContext() { - return componentContext.getRequestContext().getCallback(); - } - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/CallBackApi.composite b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/CallBackApi.composite deleted file mode 100644 index ca3a6e5f9d..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/CallBackApi.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index f17791205a..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/callback-api/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/sca-java-2.x/trunk/samples/getting-started/files/helloworld.cmds b/sca-java-2.x/trunk/samples/getting-started/files/helloworld.cmds deleted file mode 100644 index e94a0e42a6..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/files/helloworld.cmds +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# install the helloworld contribution and start its deployables -install helloworld-contribution/target/helloworld-contribution.jar -start diff --git a/sca-java-2.x/trunk/samples/getting-started/files/helloworld.xml b/sca-java-2.x/trunk/samples/getting-started/files/helloworld.xml deleted file mode 100644 index e01074870c..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/files/helloworld.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/trunk/samples/getting-started/files/helloworldws.composite b/sca-java-2.x/trunk/samples/getting-started/files/helloworldws.composite deleted file mode 100644 index abefee7360..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/files/helloworldws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/files/new-sca-contribution.xml b/sca-java-2.x/trunk/samples/getting-started/files/new-sca-contribution.xml deleted file mode 100644 index 62e8fef55d..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/files/new-sca-contribution.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/files/scdl-include.xml b/sca-java-2.x/trunk/samples/getting-started/files/scdl-include.xml deleted file mode 100644 index b15b20befd..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/files/scdl-include.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/trunk/samples/getting-started/files/wsClient.html b/sca-java-2.x/trunk/samples/getting-started/files/wsClient.html deleted file mode 100644 index 402f30cdf8..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/files/wsClient.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - -Tuscany Web service Sample Client - - - - - -

Tuscany Web service Sample Client

- -

Tuscany Web service Sample Client

- -

Sends a request to a Web Service endpoint. (This requires JavaScript)

-

Target: .

- - - - - - - - - -
- - - -
- -
- - diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/README b/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/README deleted file mode 100644 index bab77d3885..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/README +++ /dev/null @@ -1,42 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a simple helloworld style SCA application and how to run that with Tuscany. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates a jar format SCA contribution with a deployable composite, helloworld.comosite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Java class. - -You can use the contribution by installing it and starting the composite in the Tuscany Shell. To do -that run the following command in the helloworld-contribution folder: - - mvn tuscany:run - -Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld-contribution - -Once the Shell has been started with one of those methods you can use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services. You may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - ---- - -This sample was created by the Tuscany contribution-jar Maven archetype. You can use that archetype to -create your own SCA contribution projects by running the following Maven command: - - mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org - -then at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. -This project used the following answers: - - Define value for property 'groupId': : org.apache.tuscany.sca.samples - Define value for property 'artifactId': : helloworld-contribution - Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT - Define value for property 'package': org.apache.tuscany.sca.samples: sample diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/pom.xml b/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/pom.xml deleted file mode 100644 index 5ecc7a8831..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/pom.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca.samples - helloworld-contribution - 2.0-SNAPSHOT - jar - - helloworld-contribution - - - 2.0-SNAPSHOT - UTF-8 - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - - - install - helloworld-contribution - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - true - true - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/Helloworld.java b/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/Helloworld.java deleted file mode 100644 index f4e8c50448..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/Helloworld.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; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index 3b86c10df0..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.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 sample; - -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.EagerInit; - -@Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - - @Init - public void init() { - System.out.println(sayHello("world")); - } -} diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 95c32fb5bf..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite b/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite deleted file mode 100644 index e0206cd6e8..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index be27aa68ef..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.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 sample; - -import org.junit.Assert; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException { - - // Run the SCA composite in a Tuscany runtime - Node node = TuscanyRuntime.runComposite("helloworld.composite", "target/classes"); - try { - - // Get the Helloworld service proxy - Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent"); - - // test that it works as expected - Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); - - } finally { - // Stop the Tuscany runtime Node - node.stop(); - } - } -} diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/README b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/README deleted file mode 100644 index 828aadb0f1..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/README +++ /dev/null @@ -1,7 +0,0 @@ -The README in the /samples directory provides -general instructions about building and running samples. (where -distribution-unpack-dir is the directory in which you unpacked the tuscany -binary distribution archive). Take a look there first (noting at you read it that this sample -is not a new style sample). - -TODO - finish \ No newline at end of file diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/pom.xml b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/pom.xml deleted file mode 100644 index 4a8c757ecf..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-SNAPSHOT - ../../pom.xml - - - sample-helloworld-webapp - Apache Tuscany SCA Sample Helloworld - war - - - - - org.apache.tuscany.sca - tuscany-base-runtime - 2.0-SNAPSHOT - - - - junit - junit - 4.8.1 - test - - - - - - helloworld - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - compile - - copy - - - - - org.apache.tuscany.sca - sample-helloworld-contribution - ${project.version} - - src/main/webapp/WEB-INF/sca-contributions - - - - - - - - - org.mortbay.jetty - maven-jetty-plugin - 6.1.18 - - helloworld - foo - 9999 - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.java b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.java deleted file mode 100644 index 1eeb8be9fd..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.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; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 0c03826f99..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b83a9c3417..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Apache Tuscany Helloworld Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.jsp - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/hello.jsp b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/main/webapp/hello.jsp deleted file mode 100644 index 57abb08ca2..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/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/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/Helloworld.java b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/Helloworld.java deleted file mode 100644 index f1ccf0b1ba..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/Helloworld.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 itest; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - String sayHello(String name); -} diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCaseFIXME.java b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCaseFIXME.java deleted file mode 100644 index 76d6661576..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCaseFIXME.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package itest; - -import static org.junit.Assert.assertEquals; - -import java.net.URI; - -import org.junit.Test; -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - */ -public class HelloworldTestCaseFIXME { - - @Test - public void testHelloworld() throws NoSuchDomainException, NoSuchServiceException { -// TODO: need to fix the config URI so it works properly -// SCAClientFactory factory = SCAClientFactory.newInstance(URI.create("uri:default?remote=127.0.0.1:54321")); -// SCAClientFactory factory = SCAClientFactory.newInstance(URI.create("tuscany:default?remotes=192.168.1.64")); -// Helloworld helloworld = factory.getService(Helloworld.class, "HelloworldComponent"); -// assertEquals("Hello World", helloworld.sayHello("World")); - } - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml b/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml deleted file mode 100644 index a68aa28698..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - org.apache.tuscany.sca.config - uri:default?bind=127.0.0.1:54321 - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/pom.xml b/sca-java-2.x/trunk/samples/getting-started/pom.xml deleted file mode 100644 index 56195a1997..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-SNAPSHOT - - tuscany-samples-getting-started-contributions - org.apache.tuscany.sca - pom - Apache Tuscany SCA Getting Started Sample Contributions - - - - default - - true - - - helloworld-contribution - scdl-include-contribution - callback-api - sca-scopes - helloworld-webapp - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/pom.xml b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/pom.xml deleted file mode 100644 index 878da43573..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-SNAPSHOT - ../../pom.xml - - Apache Tuscany SCA Sample SCA Scopes Contribution - sample-sca-scopes-contribution - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Client.java b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Client.java deleted file mode 100644 index 13f6e003f8..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Client.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 Client { - - void run(); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/ClientImpl.java b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/ClientImpl.java deleted file mode 100644 index 3dbeeb0649..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/ClientImpl.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 sample; - -import org.oasisopen.sca.annotation.Reference; - -public class ClientImpl implements Client { - - private static final int TIMES = 5; - - @Reference - private CompositeService compositeService; - - @Reference - private StatelessService statelessService; - - public void setCompositeService(CompositeService compositeService) { - this.compositeService = compositeService; - } - - public void setStatelessService(StatelessService statelessService) { - this.statelessService = statelessService; - } - - @Override - public void run() { - System.out.println("Calling CompositeService " + TIMES + " times..."); - for (int i = 0 ; i < TIMES; i++) { - compositeService.hello(); - } - System.out.println("Calling StatelessService " + TIMES + " times..."); - for (int i = 0 ; i < TIMES; i++) { - statelessService.hello(); - } - } - - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeService.java b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeService.java deleted file mode 100644 index 60384cb73c..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeService.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; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CompositeService { - - void hello(); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeServiceImpl.java b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeServiceImpl.java deleted file mode 100644 index f4587671c0..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/CompositeServiceImpl.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.Scope; -import org.oasisopen.sca.annotation.Service; - -@Scope("COMPOSITE") -@Service(CompositeService.class) -public class CompositeServiceImpl implements CompositeService { - - public CompositeServiceImpl() { - super(); - System.out.println("Constructing CompositeServiceImpl instance."); - } - - @Override - public void hello() { - System.out.println("Saying hello to CompositeServiceImpl instance."); - } - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Launcher.java b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Launcher.java deleted file mode 100644 index 8d00b6ef64..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/Launcher.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.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public class Launcher { - - public static void main(String[] args) { - Node node = startRuntime(); - Client client = node.getService(Client.class, "Client"); - client.run(); - stopRuntime(node); - } - - /** - * Starts a Tuscany node with the predefined contribution. - * - * @return the running node - */ - private static Node startRuntime() { - String location = ContributionLocationHelper.getContributionLocation("scopes.composite"); - Node node = NodeFactory.newInstance().createNode("scopes.composite", new Contribution("c1", location)); - node.start(); - return node; - } - - /** - * Stops a Tuscany node. - * - * @param node the node to stop - */ - private static void stopRuntime(Node node) { - node.stop(); - } - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessService.java b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessService.java deleted file mode 100644 index 8474bc6ff3..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessService.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; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface StatelessService { - - void hello(); - -} diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessServiceImpl.java b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessServiceImpl.java deleted file mode 100644 index 94d6339c3d..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/java/sample/StatelessServiceImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package sample; - -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.Service; - -@Scope("STATELESS") -@Service(StatelessService.class) -public class StatelessServiceImpl implements StatelessService { - - public StatelessServiceImpl() { - super(); - System.out.println("Constructing StatelessServiceImpl instance."); - } - - @Override - public void hello() { - System.out.println("Saying hello to StatelessServiceImpl."); - } -} diff --git a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/resources/scopes.composite b/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/resources/scopes.composite deleted file mode 100644 index 14937a1f34..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/sca-scopes/src/main/resources/scopes.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/README b/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/README deleted file mode 100644 index ed0f1d0ce4..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/README +++ /dev/null @@ -1,7 +0,0 @@ -The README in the /samples directory provides -general instructions about building and running samples. (where -distribution-unpack-dir is the directory in which you unpacked the tuscany -binary distribution archive). Take a look there first (noting at you read it that this sample -is not a new style sample). - -TODO - finish this \ No newline at end of file diff --git a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/pom.xml b/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/pom.xml deleted file mode 100644 index 3dfd4da55d..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-SNAPSHOT - ../../pom.xml - - - zip - sample-scdl-include-contribution - Apache Tuscany SCA Sample include Composite Contribution - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-SNAPSHOT - provided - - - junit - junit - 4.8.1 - test - - - - - ${project.artifactId} - - - - - - org.apache.tuscany.maven.plugins - maven-zip-plugin - alpha2 - true - - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - 2.0-SNAPSHOT - - - - ../helloworld-contribution/target/helloworld-contribution.jar - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index b7677f1740..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - diff --git a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/scdl-include.composite b/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/scdl-include.composite deleted file mode 100644 index 7f75c65a68..0000000000 --- a/sca-java-2.x/trunk/samples/getting-started/scdl-include-contribution/src/main/resources/scdl-include.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -- cgit v1.2.3