Skip to content

Commit

Permalink
Revert "artemis jmx domain"
Browse files Browse the repository at this point in the history
This reverts commit 4f550ca
  • Loading branch information
antonwierenga committed Jun 13, 2022
1 parent 0b9940d commit 563e2c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ organization := "com.antonwierenga"

name := "activemq-cli"

version := "0.9.1"
version := "0.9.0"

scalaVersion := "2.11.6"

Expand Down
4 changes: 1 addition & 3 deletions src/main/scala/activemq/cli/ActiveMQCLI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
21 changes: 10 additions & 11 deletions src/main/scala/activemq/cli/command/Commands.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 563e2c0

Please sign in to comment.