Bug in the WebConsole RemoteJMX connectivity

Solution In Progress - Updated -

Issue

We are using a standalone ActiveMQ WebConsole that connects remotedly to the broker using JMX.

I have noticed that a bug has been introduced by the JMX MBean naming changes that came with ActiveMQ 5.8. It prevents the ActiveMQ WebConsole to connect to the remote broker as it doesn't "see" the broker MBean.

Bug affects ActiveMQ 5.8 and 5.9, JBoss A-MQ 6.0 and 6.1 SNAPSHOT.

Here is faulty code in activemq-web module in class org.apache.activemq.web.RemoteJMXBrokerFacade

protected Set<ObjectName> findBrokers(MBeanServerConnection connection) throws IOException, MalformedObjectNameException {
if (this.brokerName == null) {
    name = new ObjectName("org.apache.activemq:type=Broker,brokerName=*");
  } else {
    name = new ObjectName("org.apache.activemq:brokerName="
                    + this.brokerName + ",Type=broker");
  }

When brokerName hasn't been specified, the remote JMX connection works OK.

When the brokerName has been specified, the remote JMX connection fails.

Fix is to replace the second name definition with the proper ObjectName :

name = new ObjectName("org.apache.activemq:type=Broker,brokerName=" + this.brokerName);

Environment

  • JBoss A-MQ 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content