mattrpav commented on PR #908:
URL: https://github.com/apache/activemq/pull/908#issuecomment-1277675599

   In the doStop()-- shouldn't all the cache collections be cleared and not 
just the registered mbeans? 
   
   If a broker is stopped + started the caches will have previous run data in 
them.
   
   ```
       @Override
       protected void doStop(ServiceStopper stopper) {
           super.doStop(stopper);
           // lets remove any mbeans not yet removed
           for (Iterator<ObjectName> iter = registeredMBeans.iterator(); 
iter.hasNext();) {
               ObjectName name = iter.next();
               try {
                   managementContext.unregisterMBean(name);
               } catch (InstanceNotFoundException e) {
                   LOG.warn("The MBean {} is no longer registered with JMX", 
name);
               } catch (Exception e) {
                   stopper.onException(this, e);
               }
           }
           registeredMBeans.clear();
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to