上篇内容 (点击可看)里面提到了我遇到的bug,最后发现是有人动了我的服务器上的activemq,导致我的队列出现了问题。
我的代码能够获得topic,能够获得broker,就是队列信息获取不到,我还纳闷了.....
import java.util.HashMap;
import java.util.Map;
import java.util.PriorityQueue;
//import javax.management.MBeanInfo;
import javax.management.MBeanServerConnection;
import javax.management.MBeanServerInvocationHandler;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import org.apache.activemq.broker.jmx.BrokerViewMBean;
import org.apache.activemq.broker.jmx.DestinationViewMBean;
import org.apache.activemq.broker.jmx.QueueViewMBean;
import org.apache.activemq.br