ManagementContext.queryNames returns ObjectNames
This commit is contained in:
parent
adef9e4133
commit
29deb12ddb
|
@ -22,7 +22,6 @@ import static org.junit.Assume.assumeNotNull;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.management.ObjectInstance;
|
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
|
|
||||||
import org.apache.activemq.broker.BrokerService;
|
import org.apache.activemq.broker.BrokerService;
|
||||||
|
@ -162,11 +161,10 @@ public class DuplexNetworkMBeanTest {
|
||||||
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
|
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
|
||||||
try {
|
try {
|
||||||
// trace all existing MBeans
|
// trace all existing MBeans
|
||||||
Set<?> all = broker.getManagementContext().queryNames(null, null);
|
Set<ObjectName> all = broker.getManagementContext().queryNames(null, null);
|
||||||
LOG.info("Total MBean count=" + all.size());
|
LOG.info("Total MBean count=" + all.size());
|
||||||
for (Object o : all) {
|
for (ObjectName on : all) {
|
||||||
ObjectInstance bean = (ObjectInstance) o;
|
LOG.info(on.toString());
|
||||||
LOG.info(bean.getObjectName().toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ignored) {
|
catch (Exception ignored) {
|
||||||
|
|
|
@ -161,11 +161,10 @@ public class DurableSubscriberWithNetworkRestartTest extends JmsMultipleBrokersT
|
||||||
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
|
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
|
||||||
try {
|
try {
|
||||||
// trace all existing MBeans
|
// trace all existing MBeans
|
||||||
Set<?> all = broker.getManagementContext().queryNames(null, null);
|
Set<ObjectName> all = broker.getManagementContext().queryNames(null, null);
|
||||||
LOG.info("Total MBean count=" + all.size());
|
LOG.info("Total MBean count=" + all.size());
|
||||||
for (Object o : all) {
|
for (ObjectName on : all) {
|
||||||
//ObjectInstance bean = (ObjectInstance)o;
|
LOG.info(on);
|
||||||
LOG.info(o);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ignored) {
|
catch (Exception ignored) {
|
||||||
|
|
|
@ -20,7 +20,6 @@ import javax.jms.InvalidSelectorException;
|
||||||
import javax.jms.Session;
|
import javax.jms.Session;
|
||||||
import javax.jms.TopicConnection;
|
import javax.jms.TopicConnection;
|
||||||
import javax.jms.TopicSession;
|
import javax.jms.TopicSession;
|
||||||
import javax.naming.InitialContext;
|
|
||||||
|
|
||||||
import org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport;
|
import org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
Loading…
Reference in New Issue