Hi Jeff, Alex,

having some kind of test that reproduces the issue would be great.
It'd be good to add something to the tests Alex already contributed

https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web-demo/src/main/webapp/test/amq_test.html?r=HEAD


Cheers
--
Dejan Bosanac
-----------------
FuseSource - The experts in open source integration and messaging.
Email: dej...@fusesource.com
Web: http://fusesource.com
Twitter:  http://twitter.com/dejanb
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net



On Tue, Dec 14, 2010 at 7:17 PM, Alex Dean <a...@crackpot.org> wrote:
> Hi Jeff.  That's great news.  I'm not very Java-savvy, but I've made a few 
> patches to the activemq ajax code in the past.  I've spent a bit of time 
> lately trying to get junit test cases working for testing 
> MessageListenerServlet, so I haven't actually made much progress in solving 
> the issue at hand.  If you've found the error, that's fantastic.  Can you 
> post your patch?
>
> To get a ticket reported, use 
> https://issues.apache.org/jira/secure/CreateIssue!default.jspa.  You'll need 
> to register before you can open an issue.  If you can attach a patch, I will 
> happily contribute to the testing effort.
>
> alex
>
> On Dec 14, 2010, at 10:48 AM, Jeff Rose wrote:
>
>> Hi Alex,
>>  Thanks for the response.  We looked into it a bit more based on your
>> suggestion, and we discovered that there is an error occurring when the
>> continuation is resumed in onMessageAvailable in AjaxListener.java.  It
>> looks like this onMessageAvailable handler is being called every time a new
>> message arrives on the queue, and then it is trying to resume a continuation
>> that has already been resumed, which causes an illegal state exception.
>> We've been trying to fix the bug  by checking first:
>>
>>   !continuation.isResumed()
>>
>> but we are still getting the error occasionally (although it does often get
>> all of the messages now).  This seems to be a pretty fundamental bug in the
>> AJAX support of ActiveMQ.  Definitely worth posting a ticket (although I
>> don't know where that is done).
>>
>> -Jeff
>>
>>
>> On Fri, Dec 10, 2010 at 6:33 PM, Alex Dean <a...@crackpot.org> wrote:
>>
>>>
>>> On Dec 10, 2010, at 11:06 AM, Jeff Rose wrote:
>>>
>>>> Hi,
>>>> Based on the ajax chat example I've put together a small test page to
>>>> display messages that I post to a topic or queue using a php script.
>>> When I
>>>> send 10 messages in a for loop from PHP then the ajax handler is only
>>>> getting called with a couple of the messages though.  Looking at ActiveMQ
>>>> with jconsole I can see that all of the messages are getting taken off
>>> the
>>>> queue, but they don't all get to the browser.  Do I need to do something
>>>> special in order to make sure I get all of the messages?
>>>>
>>>> The relevant code is posted below.  Any thoughts or advice would be
>>>> appreciated.
>>>
>>> I've noticed the same issue recently.  If I publish 5 messages via a
>>> ruby+stomp publisher, I receive all 5 in a ruby+stomp consumer, but I only
>>> see 1 message in a javascript/ajax consumer. The <ajax-response> XML element
>>> always has only a single <response> element.  (I can see this in Firebug.)
>>> The admin webapp shows that all my messages are being de-queued, so I think
>>> the ajax servlet is picking up the messages but failing to deliver them to
>>> the browser.
>>>
>>> Just this morning I was poking around in the code trying to see what's
>>> going on.  I have a guess it's in MessageListenterServelet.doMessages().
>>> There's some code in there which should put multiple <response> elements
>>> into a single <ajax-response>, but it's not happening for some reason.
>>>
>>> Maybe we should open a ticket for this?
>>>
>>> alex
>
>

Reply via email to