activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chago <nab...@visualxs.com>
Subject ActiveMQ, AJAX and polling timeout value
Date Mon, 27 Aug 2007 17:45:04 GMT

I'm a bit confused by the line in _amq.js that initiates the long poll to the
server (Jetty 6.1.4 using continuations in my particular case.)

  _startPolling : function() {
    if (amq.poll)
      new Ajax.Request(amq.uri, { 
        method: 'get', 
        parameters: 'timeout=0', 
        onSuccess: amq._pollHandler });
  }

Tracing the code into MessageListenerServlet, it seems like this request
would cause an infinite wait to occur when continuation.suspend(timeout); is
reached. A timeout value of 0 implies an infinite wait.

I see the infinite wait when I run the Jetty 6.1.4 and ActiveMQ 5 SNAPSHOT
from my IDE, however when I run the activemq-web-demo module using maven,
the get request with a timeout of 0 returns immediately with an envelope
with no messages.

I'm confused by the different behaviors, and I can only debug into the code
that I launch from inside my IDE. I'm not sure how to remote debug from a
maven-launched app, but I will continue to look into this.

Any thoughts?

-- 
View this message in context: http://www.nabble.com/ActiveMQ%2C-AJAX-and-polling-timeout-value-tf4337238s2354.html#a12354159
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message