Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 85821 invoked from network); 28 Sep 2010 17:30:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 17:30:19 -0000 Received: (qmail 74208 invoked by uid 500); 28 Sep 2010 17:30:19 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 74161 invoked by uid 500); 28 Sep 2010 17:30:18 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 74153 invoked by uid 99); 28 Sep 2010 17:30:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 17:30:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex@crackpot.org designates 206.251.244.166 as permitted sender) Received: from [206.251.244.166] (HELO crackpot.org) (206.251.244.166) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 17:30:12 +0000 Received: from [206.144.44.194] (helo=[192.168.0.132]) by crackpot.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1P0dzq-0008WN-4u for users@activemq.apache.org; Tue, 28 Sep 2010 12:29:49 -0500 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) From: Alex Dean In-Reply-To: Date: Tue, 28 Sep 2010 12:29:35 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <8D3A0F37-C6A0-4973-AD9F-4B4105066E07@crackpot.org> References: <15163C87-6385-45D1-BCCC-5B172D5A377E@crackpot.org> <0588DF44-97C5-4106-88AE-BC3F4CE50E1A@crackpot.org> To: users@activemq.apache.org X-Mailer: Apple Mail (2.1081) X-SA-Exim-Connect-IP: 206.144.44.194 X-SA-Exim-Mail-From: alex@crackpot.org X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on crackpot.org X-Spam-Level: Subject: Re: multiple ajax clients in the same browser? X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-SA-Exim-Scanned: Yes (on crackpot.org) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 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, >=20 > 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 >=20 > = http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web/src/main/= java/org/apache/activemq/web/MessageListenerServlet.java?r=3DHEAD >=20 > as that is where's the most of the server side logic is implemented. >=20 > If you need to look at the REST Servlet for the reference, take a look = at >=20 > = http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web/src/main/= java/org/apache/activemq/web/MessageServlet.java?r=3DHEAD >=20 > Cheers > -- > Dejan Bosanac - http://twitter.com/dejanb >=20 > Open Source Integration - http://fusesource.com/ > ActiveMQ in Action - http://www.manning.com/snyder/ > Blog - http://www.nighttale.net >=20 >=20 >=20 > On Mon, Sep 13, 2010 at 3:46 PM, Alex Dean wrote: >> I'd be interested in attempting a fix for this problem. Please send = along >> any information you think would help me get started. >>=20 >> thanks, >> alex >>=20 >> On Sep 13, 2010, at 3:25 AM, Dejan Bosanac wrote: >>=20 >>> Hi Alex, >>>=20 >>> 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. >>>=20 >>> Cheers >>> -- >>> Dejan Bosanac - http://twitter.com/dejanb >>>=20 >>> Open Source Integration - http://fusesource.com/ >>> ActiveMQ in Action - http://www.manning.com/snyder/ >>> Blog - http://www.nighttale.net >>>=20 >>>=20 >>>=20 >>> On Fri, Sep 10, 2010 at 6:46 PM, Alex Dean = wrote: >>>>=20 >>>> 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. >>>>=20 >>>> Firebug/Firefox in the previously-opened window starts reporting = errors >>>> like >>>> "No handler found to match message with id =3D 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. >>>>=20 >>>> 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? >>>>=20 >>>> thanks, >>>> alex >>>>=20 >>>=20 >>=20 >>=20 >=20