I just checked the ActiveMQ code and can confirm that they only use MDC.put and MDC.remove in their code, i.e. they don't depend on that value.
They use an MDC.get in one of their unit tests, though.
Interestingly, the code also contains the following line: // need to remove MDC as we must not inherit MDC in child threads causing leaks
They remove their "activemq.broker" MDC value directly before executing a Thread.start to actively prevent the issue we are discussing right now. They MDC.put that value again after the Thread has been started.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
I just checked the ActiveMQ code and can confirm that they only use MDC.put and MDC.remove in their code, i.e. they don't depend on that value.
They use an MDC.get in one of their unit tests, though.
Interestingly, the code also contains the following line:
// need to remove MDC as we must not inherit MDC in child threads causing leaks
They remove their "activemq.broker" MDC value directly before executing a Thread.start to actively prevent the issue we are discussing right now. They MDC.put that value again after the Thread has been started.