ActiveMQ
  1. ActiveMQ
  2. AMQ-3776

synchronization error in MessageListenerServlet.getAjaxWebClient

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.6.0
    • Component/s: None
    • Labels:
      None

      Description

      Note: I found this problem by reading code, not by an actual behavior problem!

      In the latest revision of MessageListenerServlet.getAjaxWebClient() you can see that the ajaxWebClients map is read outside of a synchronized block and then edited inside the block. This looks like a simple mistake, and the get() should be moved down one line.

      http://svn.apache.org/viewvc/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java?revision=1177026&view=markup#l438

      Theoretically, the downside of this bug will be that new clients will be unnecessarily created if a single web session connects to the servlet from two or more concurrent connections. In practice, this almost never happens because most ajax users of ActiveMQ should have only one connection in flight at a time.

        Activity

        Timothy Bish made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Timothy Bish [ tabish121 ]
        Fix Version/s 5.6.0 [ 12317974 ]
        Resolution Fixed [ 1 ]
        Hide
        Timothy Bish added a comment -

        Fix applied in trunk.

        Show
        Timothy Bish added a comment - Fix applied in trunk.
        Chris Dolan created issue -

          People

          • Assignee:
            Timothy Bish
            Reporter:
            Chris Dolan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development