jbonofre opened a new pull request, #2555: URL: https://github.com/apache/activemq/pull/2555
Backport of #2553 to `activemq-6.3.x`. ## Summary - Fixes the Jolokia/JMX `IllegalStateException` reported in #2551: on a slave broker running with `startAsync=true`, querying the Broker MBean over Jolokia failed even though attributes like `Slave` were perfectly readable, because Jolokia reads all attributes in one batch and a single throwing getter aborted the whole response. - `BrokerView`'s read-only attribute getters (`getBrokerId()`, `getBrokerName()`, destination/subscriber/producer lists, and the destination statistics counters) now return a safe fallback (`null`/`0`/empty array, broker name falls back to the configured name on `BrokerService`) instead of throwing via `safeGetBroker()` when `ManagedRegionBroker` hasn't been set yet. - Getters that mutate broker state (`resetStatistics()`, `enableStatistics()`, `disableStatistics()`, destination add/remove, durable subscriber create/destroy) are unchanged and still throw `IllegalStateException` through `safeGetBroker()`, since they genuinely can't run before the broker is up. Clean cherry-pick of the `main` commit; `BrokerView.java` was identical between `main` and `activemq-6.3.x` before this change. Fixes #2551 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
