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.util.Set;
|
||||
|
||||
import javax.management.ObjectInstance;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
@ -162,11 +161,10 @@ public class DuplexNetworkMBeanTest {
|
|||
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
|
||||
try {
|
||||
// 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());
|
||||
for (Object o : all) {
|
||||
ObjectInstance bean = (ObjectInstance) o;
|
||||
LOG.info(bean.getObjectName().toString());
|
||||
for (ObjectName on : all) {
|
||||
LOG.info(on.toString());
|
||||
}
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
|
|
|
@ -161,11 +161,10 @@ public class DurableSubscriberWithNetworkRestartTest extends JmsMultipleBrokersT
|
|||
private void logAllMbeans(BrokerService broker) throws MalformedURLException {
|
||||
try {
|
||||
// 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());
|
||||
for (Object o : all) {
|
||||
//ObjectInstance bean = (ObjectInstance)o;
|
||||
LOG.info(o);
|
||||
for (ObjectName on : all) {
|
||||
LOG.info(on);
|
||||
}
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
|
|
|
@ -20,7 +20,6 @@ import javax.jms.InvalidSelectorException;
|
|||
import javax.jms.Session;
|
||||
import javax.jms.TopicConnection;
|
||||
import javax.jms.TopicSession;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
import org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport;
|
||||
import org.junit.Test;
|
||||
|
|
Loading…
Reference in New Issue