mirror of https://github.com/apache/activemq.git
Applying patch and fix for AMQ-3303: Standalone web console crashes when accessing broker via master-slave failover.
Patch supplied by Arnaud BRAND. Many thanks! Fix confirmed by Jamie Goodyear. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1499141 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
34f3329370
commit
d2836d1362
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -204,7 +205,12 @@ public class RemoteJMXBrokerFacade extends BrokerFacadeSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<ObjectName> brokers = connection.queryNames(name, null);
|
Set<ObjectName> brokers = connection.queryNames(name, null);
|
||||||
return brokers;
|
Set<ObjectName> masterBrokers = new HashSet<ObjectName>();
|
||||||
|
for (ObjectName objectName : brokers) {
|
||||||
|
BrokerViewMBean mbean = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(connection, objectName, BrokerViewMBean.class, true);
|
||||||
|
if (!mbean.isSlave()) masterBrokers.add(objectName);
|
||||||
|
}
|
||||||
|
return masterBrokers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void purgeQueue(ActiveMQDestination destination) throws Exception {
|
public void purgeQueue(ActiveMQDestination destination) throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue