Wicket
  1. Wicket
  2. WICKET-4729

atmosphere example will stop working if opening the same url in a different tab in the same browser

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0-beta3
    • Fix Version/s: 6.1.0
    • Component/s: wicket-atmosphere
    • Labels:
      None

      Description

      If the url of a running atmosphere example is copied and then opened in a different tab while the old one left open in the same browser,
      i.e. there are two atmosphere examples of the same url opened at the same time in a browser,
      one of them will stop working.

      I found the cause of this problem is that trackingPages in EventBus is using a BiMap.
      If there are different tracking-ids mapping to the same PageKey, one of the map entry will be removed.
      The simple solution would be replacing the BiMap with HashMap, but I think there might be reasons why BiMap is used here.

        Activity

        Hide
        Emond Papegaaij added a comment -

        I've reworked the page registration. The BiMap was used to make sure the registration would not grow with every page opened. I've replaced the BiMap with a normal HashMap and added a method to unregister a connection when it is closed.

        Show
        Emond Papegaaij added a comment - I've reworked the page registration. The BiMap was used to make sure the registration would not grow with every page opened. I've replaced the BiMap with a normal HashMap and added a method to unregister a connection when it is closed.

          People

          • Assignee:
            Emond Papegaaij
            Reporter:
            Sean Lin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development