4 Replies Latest reply on May 29, 2017 8:19 AM by Aymen Ragoubi

    Connect to BrokerViewMBean via jmx

    Aymen Ragoubi Newbie

      I am trying to connect to my activeMQ broker to manage topics.
      I try to get the broker bean like this :

       

      JMXServiceURL url = new JMXServiceURL(
      "service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi");
      JMXConnector connector = JMXConnectorFactory.connect(url, null);
      connector
      .connect();
      MBeanServerConnection connection = connector.getMBeanServerConnection();
      ObjectName name = new ObjectName(
      "my-broker:BrokerName=localhost,Type=Broker");
      BrokerViewMBean mbean = (BrokerViewMBean) MBeanServerInvocationHandler
      .newProxyInstance(connection, name, BrokerViewMBean.class, true);

       

      My problem is that I am getting this Error in my server side :

       

      ERROR [org.jboss.remoting.remote.connection] (Remoting "desktop-4d80fu1" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1246907721

       

      Could someone help me with this ?