-
Sub-task
-
Resolution: Done
-
Major
-
None
MBeans for resources which are unaddressable for authenticated user still has its corresponding MBeans registered - e.g. security-realm=ManagementRealm
Map<String, String[]> env = new HashMap<String, String[]>(); String[] credentials = {"monitor", "asd1asd!"}; env.put(JMXConnector.CREDENTIALS, credentials); JMXServiceURL url = new JMXServiceURL("service:jmx:remoting-jmx://localhost:9999"); JMXConnector jmxConnector = JMXConnectorFactory.connect(url, env); MBeanServerConnection mBeanServerConnection = jmxConnector.getMBeanServerConnection(); ObjectName mgmtRealm = new ObjectName("jboss.as:core-service=management,security-realm=ManagementRealm"); MBeanInfo info = mBeanServerConnection.getMBeanInfo(mgmtRealm); System.out.println(info.getClassName()); >>> org.jboss.as.controller.ModelController