From 9425990f532b1152c2d73db96c0f07ef5216a3d1 Mon Sep 17 00:00:00 2001 From: lresende Date: Thu, 12 Nov 2009 00:43:48 +0000 Subject: Moving 2.x contribs git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835178 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca-contrib/samples/chat-webapp/README | 83 --------- .../samples/chat-webapp/chat-webapp.png | Bin 6552 -> 0 bytes .../samples/chat-webapp/chat-webapp.svg | 187 --------------------- java/sca-contrib/samples/chat-webapp/pom.xml | 97 ----------- .../src/main/java/sample/ChatService.java | 26 --- .../src/main/java/sample/ChatServiceImpl.java | 36 ---- .../chat-webapp/src/main/resources/chat.composite | 40 ----- .../src/main/webapp/META-INF/sca-contribution.xml | 24 --- .../chat-webapp/src/main/webapp/WEB-INF/web.xml | 37 ---- .../samples/chat-webapp/src/main/webapp/chat.html | 70 -------- 10 files changed, 600 deletions(-) delete mode 100644 java/sca-contrib/samples/chat-webapp/README delete mode 100644 java/sca-contrib/samples/chat-webapp/chat-webapp.png delete mode 100644 java/sca-contrib/samples/chat-webapp/chat-webapp.svg delete mode 100644 java/sca-contrib/samples/chat-webapp/pom.xml delete mode 100644 java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatService.java delete mode 100644 java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.java delete mode 100644 java/sca-contrib/samples/chat-webapp/src/main/resources/chat.composite delete mode 100644 java/sca-contrib/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 java/sca-contrib/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 java/sca-contrib/samples/chat-webapp/src/main/webapp/chat.html (limited to 'java/sca-contrib/samples/chat-webapp') diff --git a/java/sca-contrib/samples/chat-webapp/README b/java/sca-contrib/samples/chat-webapp/README deleted file mode 100644 index 09b9c6f6be..0000000000 --- a/java/sca-contrib/samples/chat-webapp/README +++ /dev/null @@ -1,83 +0,0 @@ -Chat WebApp Sample -================== -This sample demonstrates the SCA DWR binding to implement the classic Ajax sample -of a chat application which allows multiple users to chat from their browsers. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-chat-webapp.war) -to your web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-chat-webapp - -The port and hostname will of course vary depending on your local installation. - -Sample Overview ---------------- -The sample provides an SCA component which has an SCA service using the SCA DWR -binding and an SCA reference also using the DWR binding. The component implementation -simply forwards every invocation of the service as an invocation on the reference. The -component reference is scoped by the composite so every active client of the composite -will receive every message sent to the component service, thus implementing the chat -application with very little code. - -chat-webapp/ - src/ - main/ - java/ - sample/ - ChatService.java - service interface - ChatServiceImpl.java - service implementation - resources/ - chat.composite - the SCA assembly for this sample - webapp - chat.html - the html UserInterface for this application - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd chat-webapp -ant package - -This should result in a war file (sample-chat-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in you -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-chat-webapp - -The port and hostname will of course vary depending on your local installation. - -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 chat-webapp -mvn - -Again this should result in a war file (sample-chat-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/java/sca-contrib/samples/chat-webapp/chat-webapp.png b/java/sca-contrib/samples/chat-webapp/chat-webapp.png deleted file mode 100644 index fdf540d243..0000000000 Binary files a/java/sca-contrib/samples/chat-webapp/chat-webapp.png and /dev/null differ diff --git a/java/sca-contrib/samples/chat-webapp/chat-webapp.svg b/java/sca-contrib/samples/chat-webapp/chat-webapp.svg deleted file mode 100644 index b37c1dc590..0000000000 --- a/java/sca-contrib/samples/chat-webapp/chat-webapp.svg +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - store - - - DWR - - - DWR - - Catalog - - - diff --git a/java/sca-contrib/samples/chat-webapp/pom.xml b/java/sca-contrib/samples/chat-webapp/pom.xml deleted file mode 100644 index 93fa269cf4..0000000000 --- a/java/sca-contrib/samples/chat-webapp/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-SNAPSHOT - ../../pom.xml - - sample-chat-webapp - war - Apache Tuscany SCA Chat Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-binding-dwr - 2.0-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - - - ${artifactId} - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 2.0-SNAPSHOT - - - - generate - - - - - - - - diff --git a/java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatService.java b/java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatService.java deleted file mode 100644 index bf34675b8a..0000000000 --- a/java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatService.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES 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 ChatService { - - public void chat(String msg); - -} diff --git a/java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.java b/java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.java deleted file mode 100644 index f0725dd60c..0000000000 --- a/java/sca-contrib/samples/chat-webapp/src/main/java/sample/ChatServiceImpl.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.Scope; - -@Scope("COMPOSITE") -public class ChatServiceImpl implements ChatService { - - ChatService chatters; - - public void chat(String msg) { - chatters.chat(msg); - } - - public void setChatters(ChatService chatters) { - this.chatters = chatters; - } -} diff --git a/java/sca-contrib/samples/chat-webapp/src/main/resources/chat.composite b/java/sca-contrib/samples/chat-webapp/src/main/resources/chat.composite deleted file mode 100644 index c9ce95e2dc..0000000000 --- a/java/sca-contrib/samples/chat-webapp/src/main/resources/chat.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/java/sca-contrib/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml b/java/sca-contrib/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 897849ff8d..0000000000 --- a/java/sca-contrib/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/java/sca-contrib/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml b/java/sca-contrib/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 97d91fec56..0000000000 --- a/java/sca-contrib/samples/chat-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Apache Tuscany AJAX/DWR Chat Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - chat.html - - - diff --git a/java/sca-contrib/samples/chat-webapp/src/main/webapp/chat.html b/java/sca-contrib/samples/chat-webapp/src/main/webapp/chat.html deleted file mode 100644 index 7a449a906a..0000000000 --- a/java/sca-contrib/samples/chat-webapp/src/main/webapp/chat.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - Apache Tuscany Ajax/DWR Chat Sample - - - - - - - - -

Apache Tuscany Ajax/DWR Chat Sample

- - A simple client to chat between multiple web browsers:

- - Nickname: -

- - Enter text: - - -

-
- - - -- cgit v1.2.3