activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1430862 - in /activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console: command/ListCommand.java command/PurgeCommand.java filter/MBeansObjectNameQueryFilter.java
Date Wed, 09 Jan 2013 13:53:12 GMT
Author: dejanb
Date: Wed Jan  9 13:53:12 2013
New Revision: 1430862

URL: http://svn.apache.org/viewvc?rev=1430862&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-4237 - new jmx and list and purge commands

Modified:
    activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java
    activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java
    activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java

Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java?rev=1430862&r1=1430861&r2=1430862&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java
(original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java
Wed Jan  9 13:53:12 2013
@@ -57,7 +57,7 @@ public class ListCommand extends Abstrac
     protected void runTask(List tokens) throws Exception {
         try {
             Set<String> propsView = new HashSet<String>();
-            propsView.add("BrokerName");
+            propsView.add("brokerName");
             context.printMBean(JmxMBeansUtil.filterMBeansView(JmxMBeansUtil.getAllBrokers(createJmxConnection()),
propsView));
         } catch (Exception e) {
             context.printException(new RuntimeException("Failed to execute list task. Reason:
" + e));

Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java?rev=1430862&r1=1430861&r2=1430862&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java
(original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java
Wed Jan  9 13:53:12 2013
@@ -96,7 +96,7 @@ public class PurgeCommand extends Abstra
 
             // Iterate through the queue names
             for (Iterator<String> i = tokens.iterator(); i.hasNext();) {
-                List queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), "Type=Queue,Destination="
+ i.next() + ",*");
+                List queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), "destinationType=Queue,destinationName="
+ i.next() + ",*");
 
                 for (Iterator j = queueList.iterator(); j.hasNext();) {
                     ObjectName queueName = ((ObjectInstance)j.next()).getObjectName();
@@ -150,7 +150,7 @@ public class PurgeCommand extends Abstra
      * @throws Exception
      */
     public void purgeQueue(ObjectName queue) throws Exception {
-        context.printInfo("Purging all messages in queue: " + queue.getKeyProperty("Destination"));
+        context.printInfo("Purging all messages in queue: " + queue.getKeyProperty("destinationName"));
         createJmxConnection().invoke(queue, "purge", new Object[] {}, new String[] {});
     }
 

Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java?rev=1430862&r1=1430861&r2=1430862&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java
(original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java
Wed Jan  9 13:53:12 2013
@@ -71,6 +71,8 @@ public class MBeansObjectNameQueryFilter
             if (pos >= 0) {
                 val = key.substring(pos + 1);
                 key = key.substring(0, pos);
+            } else {
+                objNameQuery += delimiter + key;
             }
 
             if (val.startsWith(QUERY_EXP_PREFIX)) {



Mime
View raw message