Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2948

Support ajax clients in multiple windows/tabs in a single browser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.4.1
    • 5.4.2
    • None
    • None
    • OSX 10.6
      Centos 5.4

    • Patch Available

    Description

      In current ajax code, there is a 1-1 relationship between ajax client and session. Since multiple windows in the same browser share the same session, it's impossible for the ajax code to update both windows. Either 1 or the other will receive messages, but not both.

      The attached patch allows an optional 'clientId' string to be passed to the JavaScript amq.init() function, similar to that supported by the REST servlet. This clientId string is sent to the server with every ajax request. In MessageListenerServlet, a new consumer is created for every new sessionid+clientId, allowing multiple windows in the same browser to send & receive messages independently.

      For some (currently) unknown reason, IE7 cannot send messages from multiple windows. 2 IE7 windows can receive messages independently with no errors, but once either IE7 window sends a message, both windows cease receiving data. This behavior is not seen in FF (OSX or WinXP) or Safari (OSX). All those browsers are able to send & receive simultaneously in multiple windows with no errors.

      Attachments

        Activity

          People

            dejanb Dejan Bosanac
            alexdean Alex Dean
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: