You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Suhov Roman (Jira)" <ji...@apache.org> on 2024/08/02 10:48:00 UTC

[jira] [Created] (ARTEMIS-4968) The getManagementConnector method returns the value of the mBeanServer field, which can be changed in the start and stop methods.

Suhov Roman created ARTEMIS-4968:
------------------------------------

             Summary: The getManagementConnector method returns the value of the mBeanServer field, which can be changed in the start and stop methods.
                 Key: ARTEMIS-4968
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4968
             Project: ActiveMQ Artemis
          Issue Type: Bug
            Reporter: Suhov Roman


File: [https://github.com/apache/activemq-artemis/blob/main/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/ManagementContext.java]

Line: 113 - 116



The getManagementConnector method returns the value of the mBeanServer field, which can be changed in the start and stop methods. These methods are already synchronized to prevent race conditions when accessing the mBeanServer field. However, to ensure thread safety when reading this field, the getManagementConnector method must also be synchronized.

public synchronized ManagementConnector getManagementConnector()

{

return mBeanServer;

}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact