From 76e64f8719a90867fa0f8157c4e66e75ccfc8481 Mon Sep 17 00:00:00 2001 From: fmoga Date: Mon, 2 Aug 2010 20:27:46 +0000 Subject: Updated the stock sample to use the comet binding implementation. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@981678 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/WEB-INF/context.xml | 4 --- .../src/main/webapp/WEB-INF/web.composite | 18 ++++++------ .../stock-comet/src/main/webapp/WEB-INF/web.xml | 32 +--------------------- .../samples/stock-comet/src/main/webapp/index.html | 19 +++++++++---- 4 files changed, 24 insertions(+), 49 deletions(-) delete mode 100755 sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/context.xml (limited to 'sca-java-2.x/contrib/samples/stock-comet/src/main/webapp') diff --git a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/context.xml b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/context.xml deleted file mode 100755 index 80763de382..0000000000 --- a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/context.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.composite index 47ab8557ea..5a1d2bb21b 100644 --- a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.composite +++ b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.composite @@ -22,12 +22,12 @@ targetNamespace="http://samples" name="Stock"> - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.xml index 4a534c043d..66c2ee4480 100644 --- a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.xml +++ b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/WEB-INF/web.xml @@ -28,38 +28,8 @@ org.apache.tuscany.sca.host.webapp.TuscanyContextListener - - - CometServlet - CometServlet - org.atmosphere.cpr.MeteorServlet - true - - org.atmosphere.servlet - sample.CometServlet - - - org.apache.tuscany.comet.scope - request - - - - - 0 - - - CometServlet - /comet - - + index.html diff --git a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/index.html b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/index.html index 3ae0ac1ae8..e03a08ccd2 100644 --- a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/index.html +++ b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/index.html @@ -27,24 +27,33 @@ document.getElementById('price').textContent = aux[1]; } - function startMonitoring() { - new Ajax.Request('/stock-comet/comet', + function getQuotes() { + new Ajax.Request('test/StockService/getQuotes', { - method: 'post', + onSuccess: function(response) { + alert("onSuccess"); + }, + onError: function(response) { + alert("onError"); + } }); } + + Event.observe(document, 'DOMContentLoaded', function(e) { + $('comet').src='test/StockService/getQuotes'; + });

Apache Tuscany Asynchronous Servlet Sample

Stock Monitor

- +
N/A N/A
- + -- cgit v1.2.3