1 Reply Latest reply on Sep 5, 2012 4:42 AM by Jeff Mesnil

    How to use management for a jmx-domain

    qtm Newbie

      Hi,

      I've got a back-up server defined like:

       

      <hornetq-server name="backup_for_server_1">

                      <clustered>true</clustered>

                      <persistence-enabled>true</persistence-enabled>

                      <jmx-management-enabled>true</jmx-management-enabled>

                      <jmx-domain>backup</jmx-domain>

                      <backup>true</backup>

        [...]

       

      I'd like to use jmx to see the data of the back-up.

      Where should I specify  the jmx-domain in the following code?

      String urlString =  System.getProperty("jmx.service.url","service:jmx:remoting-jmx://host:port);

      JMXServiceURL serviceURL = new JMXServiceURL(urlString);

      JMXConnector connector = JMXConnectorFactory.connect(serviceURL, env);

      MBeanServerConnection mbsc = connector.getMBeanServerConnection();

      ObjectName on = ObjectNameBuilder.DEFAULT.getJMSServerObjectName();

      JMSServerControl serverControl = (JMSServerControl)MBeanServerInvocationHandler.newProxyInstance(mbsc, on, JMSServerControl.class, false);

       

      Thanks