Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-5659

(7.1.0) JMX domains jboss.as and jboss.as.expr do not always correctly handle property list patterns in queryMBeans and queryNames

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR4
    • None
    • JMX
    • None
    • Hide

      1. Start JBoss EAP 7
      2. add user admin1:password1@
      3. create JMX Client

      JMXTest.java
      import java.util.HashMap;
      import java.util.Map;
      import javax.management.MBeanServerConnection;
      import javax.management.ObjectName;
      import javax.management.remote.JMXConnector;
      import javax.management.remote.JMXConnectorFactory;
      import javax.management.remote.JMXServiceURL;
      
      class JMXTest {
          public static void main(String[] args) throws Exception {
              JMXServiceURL url = new JMXServiceURL("service:jmx:remote+http://localhost:9990");
              Map feature=new HashMap();
              String[] data=new String[]{"admin1","password1@"};
              feature.put(JMXConnector.CREDENTIALS, data);
      
              JMXConnector jmxc = JMXConnectorFactory.connect(url, feature);
      
              MBeanServerConnection con = jmxc.getMBeanServerConnection();
      
              ObjectName objectName = ObjectName.getInstance("jboss.as:socket-binding=*,*");
      
              Object result = con.queryNames(objectName, null);
      
              System.out.println(result);
      
              jmxc.close();
      
          }
      }
      

      4. complile client
      javac JMXTest.java
      5. run client
      java -cp remoting-jmx-2.0.1.Final-redhat-1.jar:jboss-logging-3.3.0.Final-redhat-1.jar:jboss-remoting-4.0.21.Final-redhat-1.jar:xnio-api-3.4.0.Final-redhat-1.jar:xnio-nio-3.4.0.Final-redhat-1.jar:jboss-marshalling-1.4.11.Final-redhat-1.jar:jboss-marshalling-river-1.4.11.Final-redhat-1.jar:./ JMXTest

      bug:

      []
      

      correct:

      [jboss.as:socket-binding-group=standard-sockets,socket-binding=txn-status-manager, jboss.as:socket-binding-group=standard-sockets,socket-binding=ajp, jboss.as:socket-binding-group=standard-sockets,socket-binding=https, jboss.as:socket-binding-group=standard-sockets,socket-binding=management-https, jboss.as:socket-binding-group=standard-sockets,socket-binding=http, jboss.as:socket-binding-group=standard-sockets,socket-binding=management-http, jboss.as:socket-binding-group=standard-sockets,socket-binding=txn-recovery-environment]
      
      Show
      1. Start JBoss EAP 7 2. add user admin1:password1@ 3. create JMX Client JMXTest.java import java.util.HashMap; import java.util.Map; import javax.management.MBeanServerConnection; import javax.management.ObjectName; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; class JMXTest { public static void main( String [] args) throws Exception { JMXServiceURL url = new JMXServiceURL( "service:jmx:remote+http: //localhost:9990" ); Map feature= new HashMap(); String [] data= new String []{ "admin1" , "password1@" }; feature.put(JMXConnector.CREDENTIALS, data); JMXConnector jmxc = JMXConnectorFactory.connect(url, feature); MBeanServerConnection con = jmxc.getMBeanServerConnection(); ObjectName objectName = ObjectName.getInstance( "jboss.as:socket-binding=*,*" ); Object result = con.queryNames(objectName, null ); System .out.println(result); jmxc.close(); } } 4. complile client javac JMXTest.java 5. run client java -cp remoting-jmx-2.0.1.Final-redhat-1.jar:jboss-logging-3.3.0.Final-redhat-1.jar:jboss-remoting-4.0.21.Final-redhat-1.jar:xnio-api-3.4.0.Final-redhat-1.jar:xnio-nio-3.4.0.Final-redhat-1.jar:jboss-marshalling-1.4.11.Final-redhat-1.jar:jboss-marshalling-river-1.4.11.Final-redhat-1.jar:./ JMXTest bug: [] correct: [jboss.as:socket-binding-group=standard-sockets,socket-binding=txn-status-manager, jboss.as:socket-binding-group=standard-sockets,socket-binding=ajp, jboss.as:socket-binding-group=standard-sockets,socket-binding=https, jboss.as:socket-binding-group=standard-sockets,socket-binding=management-https, jboss.as:socket-binding-group=standard-sockets,socket-binding=http, jboss.as:socket-binding-group=standard-sockets,socket-binding=management-http, jboss.as:socket-binding-group=standard-sockets,socket-binding=txn-recovery-environment]

      Backport WFCORE-1716

            bstansbe@redhat.com Brian Stansberry
            rhn-support-mmiura Masafumi Miura
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: