diff --git a/build.sbt b/build.sbt index e2acca9..3e442c2 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ organization := "com.antonwierenga" name := "activemq-cli" -version := "0.9.1" +version := "0.9.0" scalaVersion := "2.11.6" diff --git a/src/main/scala/activemq/cli/ActiveMQCLI.scala b/src/main/scala/activemq/cli/ActiveMQCLI.scala index 906b8d7..3f0ed23 100644 --- a/src/main/scala/activemq/cli/ActiveMQCLI.scala +++ b/src/main/scala/activemq/cli/ActiveMQCLI.scala @@ -38,9 +38,7 @@ class ActiveMQCLI extends CommandMarker { object ActiveMQCLI extends App { - lazy val ReleaseNotes = Map("v0.9.1" → List( - "Support for artemis jmx domain" - ), "v0.9.0" → List( + lazy val ReleaseNotes = Map("v0.9.0" → List( "Updated shell command 'list-queues': new option --exclude-filter", "Updated shell command 'purge-all-queues': new option --exclude-filter", "Updated shell command 'remove-all-queues': new option --exclude-filter" diff --git a/src/main/scala/activemq/cli/command/Commands.scala b/src/main/scala/activemq/cli/command/Commands.scala index 5cd133a..73d89fd 100644 --- a/src/main/scala/activemq/cli/command/Commands.scala +++ b/src/main/scala/activemq/cli/command/Commands.scala @@ -156,17 +156,16 @@ abstract class Commands extends PrintStackTraceExecutionProcessor { ) jmxConnector.connect // Fuse ESB Enterprise 7.1.0 / ActiveMQ 5.9.0 use different ObjectNames - val brokerViewMBeans = List("org.apache.activemq", "org.apache.activemq.artemis").par.map(broker ⇒ - List(Map("type" → "type", "brokerName" → "brokerName"), Map("type" → "Type", "brokerName" → "BrokerName")) - .par.map(properties ⇒ - jmxConnector.getMBeanServerConnection.queryNames( - new ObjectName(s"${broker}:${properties.get("type").get}=Broker,${properties.get("brokerName").get}=${matched.jmxName.getOrElse("*")}"), //scalastyle:ignore - null //scalastyle:ignore - )).flatten - .par.map(objectName ⇒ MBeanServerInvocationHandler.newProxyInstance( - jmxConnector.getMBeanServerConnection, objectName, classOf[BrokerViewMBean], true - )) - .filter(!_.isSlave)).flatten + val brokerViewMBeans = List(Map("type" → "type", "brokerName" → "brokerName"), Map("type" → "Type", "brokerName" → "BrokerName")) + .par.map(properties ⇒ + jmxConnector.getMBeanServerConnection.queryNames( + new ObjectName(s"org.apache.activemq:${properties.get("type").get}=Broker,${properties.get("brokerName").get}=${matched.jmxName.getOrElse("*")}"), //scalastyle:ignore + null //scalastyle:ignore + )).flatten + .par.map(objectName ⇒ MBeanServerInvocationHandler.newProxyInstance( + jmxConnector.getMBeanServerConnection, objectName, classOf[BrokerViewMBean], true + )) + .filter(!_.isSlave) brokerViewMBeans.headOption match { case Some(brokerViewMBean) ⇒ {