jbonofre opened a new pull request, #2553:
URL: https://github.com/apache/activemq/pull/2553

   ## 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.
   
   ## Test plan
   
   - [x] `mvn -pl activemq-broker -am compile` succeeds
   - [ ] Manual verification: start a slave broker with `startAsync=true` and 
confirm a Jolokia bulk attribute read on the Broker MBean succeeds (including 
`Slave=true`) while the broker is still waiting on the lock
   
   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


Reply via email to