[
https://issues.apache.org/jira/browse/ARTEMIS-2571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17021526#comment-17021526
]
ASF subversion and git services commented on ARTEMIS-2571:
----------------------------------------------------------
Commit cf26103bb24f51a02acc776f1b8077fa92307853 in activemq-artemis's branch
refs/heads/master from Sebastian Thomschke
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=cf26103 ]
ARTEMIS-2571 Remove synchronization of ActiveMQServerImpl#getSessions()
> Remove unneccessary synchronization in ActiveMQServerImpl
> ---------------------------------------------------------
>
> Key: ARTEMIS-2571
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2571
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker, Web Console
> Affects Versions: 2.10.1
> Reporter: Sebastian T
> Priority: Minor
> Attachments: artemis-test.zip
>
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)