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

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

XMLWordPrintable

    • 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]
    • EAP 7.0.4

      Backport WFCORE-1716

              rhn-cservice-bbaranow Bartosz Baranowski
              rhn-cservice-bbaranow Bartosz Baranowski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: