From 09003e8fef27f51b83a5ee4242709c2b20821a83 Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Wed, 31 Jul 2019 12:55:24 -0400 Subject: [PATCH] AMQ-7102 - Improve ManagedRegionBroker performance by replacing registeredMBeans CopyOnWriteSet with a Concurrent hashmap backed set --- .../org/apache/activemq/broker/jmx/ManagedRegionBroker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java index 3eaf28bb1c..e856c5da53 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java @@ -96,7 +96,7 @@ public class ManagedRegionBroker extends RegionBroker { private final Map dynamicDestinationProducers = new ConcurrentHashMap(); private final Map subscriptionKeys = new ConcurrentHashMap(); private final Map subscriptionMap = new ConcurrentHashMap(); - private final Set registeredMBeans = new CopyOnWriteArraySet(); + private final Set registeredMBeans = new ConcurrentHashMap<>().newKeySet(); /* This is the first broker in the broker interceptor chain. */ private Broker contextBroker;