mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3473: add defensive null check for brokerservice and region broker in case of dup detection during initalisation or partially initialised test, pa is always eagerly created
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1306865 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b137af4f8a
commit
81e1de95f8
|
@ -287,11 +287,15 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter {
|
|||
|
||||
@Override
|
||||
void rollbackStatsOnDuplicate(KahaDestination commandDestination) {
|
||||
RegionBroker regionBroker = (RegionBroker) brokerService.getRegionBroker();
|
||||
Set<Destination> destinationSet = regionBroker.getDestinations(convert(commandDestination));
|
||||
for (Destination destination : destinationSet) {
|
||||
destination.getDestinationStatistics().getMessages().decrement();
|
||||
destination.getDestinationStatistics().getEnqueues().decrement();
|
||||
if (brokerService != null) {
|
||||
RegionBroker regionBroker = (RegionBroker) brokerService.getRegionBroker();
|
||||
if (regionBroker != null) {
|
||||
Set<Destination> destinationSet = regionBroker.getDestinations(convert(commandDestination));
|
||||
for (Destination destination : destinationSet) {
|
||||
destination.getDestinationStatistics().getMessages().decrement();
|
||||
destination.getDestinationStatistics().getEnqueues().decrement();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue