activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r908458 - in /activemq/trunk: activemq-web-demo/src/main/webapp/send.html activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
Date Wed, 10 Feb 2010 11:50:13 GMT
Author: dejanb
Date: Wed Feb 10 11:50:13 2010
New Revision: 908458

URL: http://svn.apache.org/viewvc?rev=908458&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2600 - jetty7 - continuations api adaptations
- web demo works now

Modified:
    activemq/trunk/activemq-web-demo/src/main/webapp/send.html
    activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java

Modified: activemq/trunk/activemq-web-demo/src/main/webapp/send.html
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-demo/src/main/webapp/send.html?rev=908458&r1=908457&r2=908458&view=diff
==============================================================================
--- activemq/trunk/activemq-web-demo/src/main/webapp/send.html (original)
+++ activemq/trunk/activemq-web-demo/src/main/webapp/send.html Wed Feb 10 11:50:13 2010
@@ -27,7 +27,7 @@
 <form action="message/FOO/BAR" method="post">
   <p>
     <label for="destination">Destination name</label>
-    <input type="text" name="destination"/>
+    <input type="text" name="destination" value="FOO.BAR"/>
   </p>
   <p>
     <label for="type">Destination Type: </label>

Modified: activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java?rev=908458&r1=908457&r2=908458&view=diff
==============================================================================
--- activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
(original)
+++ activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
Wed Feb 10 11:50:13 2010
@@ -264,9 +264,8 @@
         }
 
         Continuation continuation = ContinuationSupport.getContinuation(request);
-        continuation.setTimeout(timeout);
         Listener listener = getListener(request);
-        if (listener != null && continuation != null && !continuation.isSuspended())
{
+        if (listener != null && continuation != null && !continuation.isInitial())
{
             listener.access();
         }
 
@@ -293,15 +292,16 @@
             // Get an existing Continuation or create a new one if there are no
             // messages
 
-            if (message == null) {
+            if (message == null && continuation.isInitial()) {
                 // register this continuation with our listener.
                 listener.setContinuation(continuation);
 
                 // Get the continuation object (may wait and/or retry
                 // request here).
+                continuation.setTimeout(timeout);
                 continuation.suspend();
+                return;
             }
-            listener.setContinuation(null);
 
             // prepare the responds
             response.setContentType("text/xml");



Mime
View raw message