Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2571

Remove unneccessary synchronization in ActiveMQServerImpl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.10.1
    • 2.12.0
    • Broker, Web Console
    • None

    Description

      The ActiveMQServerImpl sessions field is a ConcurrentHashMap. Synchronizing on the ActiveMQServerImpl object to iterate over the map is not necessary. ActiveMQServerImpl#getSession, ActiveMQServerImpl#removeSession and ActiveMQServerImpl#createSession also work on the sessions field without synchronizing on the ActiveMQServerImpl.

      Removing the synchronized keyword on the ActiveMQServerImpl#getSessions() methods e.g. improves loading of Connections view, especially when multiple administrators are using the UI.

      Attachments

        1. artemis-test.zip
          33 kB
          Sebastian T

        Issue Links

          Activity

            People

              Unassigned Unassigned
              seb Sebastian T
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h