I just submitted a patch to allow multiple windows in the same browser to 
send/receive messages via ajax.

https://issues.apache.org/activemq/browse/AMQ-2948

alex

On Sep 13, 2010, at 10:48 AM, Dejan Bosanac wrote:

> Hi Alex,
> 
> with REST API (which shares some common code with Ajax stuff), you can
> send clientId parameter to create/use client with the specified id
> (and not be tied to the session). IMHO it should work the same with
> Ajax API, so you can try with that for starters. If it doesn't work,
> take a look at MessageListenerServlet
> 
> http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java?r=HEAD
> 
> as that is where's the most of the server side logic is implemented.
> 
> If you need to look at the REST Servlet for the reference, take a look at
> 
> http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java?r=HEAD
> 
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> 
> On Mon, Sep 13, 2010 at 3:46 PM, Alex Dean <a...@crackpot.org> wrote:
>> I'd be interested in attempting a fix for this problem.  Please send along
>> any information you think would help me get started.
>> 
>> thanks,
>> alex
>> 
>> On Sep 13, 2010, at 3:25 AM, Dejan Bosanac wrote:
>> 
>>> Hi Alex,
>>> 
>>> unfortunately this is not supported at the moment as listeners are
>>> tied to the session. The right approach would be to use some clientId
>>> defined in your application, like we have for REST and pass it to the
>>> servlet. If you're interested in taking a stab at implementing this, I
>>> can point you to the code that should be improved.
>>> 
>>> Cheers
>>> --
>>> Dejan Bosanac - http://twitter.com/dejanb
>>> 
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>> 
>>> 
>>> 
>>> On Fri, Sep 10, 2010 at 6:46 PM, Alex Dean <a...@crackpot.org> wrote:
>>>> 
>>>> I have been testing a web page displaying activemq data via the AJAX
>>>> interface with AMQ 5.4.  It works great when I have a single window open.
>>>>  If I open the same page in a new browser window or tab, the new
>>>> window/tab
>>>> updates correctly but the previously-open one stops updating.
>>>> 
>>>> Firebug/Firefox in the previously-opened window starts reporting errors
>>>> like
>>>> "No handler found to match message with id = display43066495".
>>>>  'display43066495' is the id used by the newly-opened window.  I had
>>>> tried
>>>> ensuring that both windows opened with unique ids, but this hasn't solved
>>>> the problem.
>>>> 
>>>> I imagine this is due to the fact that both windows share the same
>>>> session
>>>> id on the broker.  Is there a way to work around this problem, so I can
>>>> have
>>>> multiple windows open to the same amq/ajax-connected page?
>>>> 
>>>> thanks,
>>>> alex
>>>> 
>>> 
>> 
>> 
> 

Reply via email to