You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Kai Kunstmann (Jira)" <ji...@apache.org> on 2022/10/18 16:42:00 UTC

[jira] [Created] (AMQ-9129) ManagementContext not cleaning up RMI Registry properly

Kai Kunstmann created AMQ-9129:
----------------------------------

             Summary: ManagementContext not cleaning up RMI Registry properly
                 Key: AMQ-9129
                 URL: https://issues.apache.org/jira/browse/AMQ-9129
             Project: ActiveMQ
          Issue Type: Bug
            Reporter: Kai Kunstmann


The fact, that the RMI registry is wrapped into a Proxy right after its creation [1] prevents the corresponding cleanup call [2] from succeeding. This has the consequence that a single remote connection persists, which prevents the backing RMI server-socket from being cleaned up. As a consequence, the port remains blocked and a broker with the same configuration cannot be (re)started within the same JVM. This is especially problematic with unit and integration tests, that involve an embedded broker, and expect a proper clean-up.

The cleanup call should be made with the original Registry instance instead of its proxy.
In order to get a hand on the original Registry the proxy needs to be refactored to expose it.


[1] https://github.com/apache/activemq/blob/0b8e9f97685840af85bf3be6f7dc3db6ecf8fff5/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java#L677

[2] https://github.com/apache/activemq/blob/0b8e9f97685840af85bf3be6f7dc3db6ecf8fff5/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java#L254



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