You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Saravanan Thoppan (JIRA)" <ji...@apache.org> on 2012/07/22 06:39:33 UTC

[jira] [Commented] (AMQ-2948) Support ajax clients in multiple windows/tabs in a single browser

    [ https://issues.apache.org/jira/browse/AMQ-2948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420108#comment-13420108 ] 

Saravanan Thoppan commented on AMQ-2948:
----------------------------------------

Hi,
I have a auction application being developed and have multiple users login at the same time for bidding. I understand that clientId in amq.init is the unique parameter that distincts each users window. Say for example, user U1 is logged in IE and user U2 is logged in Chrome at the same time. When they bid, the messages and updated price information are passing to both the users. However, when U1 logs out of the application and logs in back for bidding, he doesnt see the updated price information in his screen, which is weird. Can you please let me know if this is really an issue or I am doing something wrong, please? I use ActiveMQ 5.6.0 with Java and Spring Framework. Appreciate your response.

Saravanan Thoppan
                
> Support ajax clients in multiple windows/tabs in a single browser
> -----------------------------------------------------------------
>
>                 Key: AMQ-2948
>                 URL: https://issues.apache.org/jira/browse/AMQ-2948
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.4.1
>         Environment: OSX 10.6
> Centos 5.4
>            Reporter: Alex Dean
>            Assignee: Dejan Bosanac
>             Fix For: 5.4.2
>
>         Attachments: support-multiple-ajax-clients-per-session.patch
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira