From 2b5d9b152a8a353553e137c98d09d3eee197516e Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Thu, 4 Apr 2013 21:02:37 +0000 Subject: [PATCH] fix for: https://issues.apache.org/jira/browse/AMQ-4438 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1464760 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/console/command/BstatCommand.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java b/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java index 92dfcad8bc..c99eb54d25 100644 --- a/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java +++ b/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java @@ -29,7 +29,7 @@ public class BstatCommand extends QueryCommand { "", "Bstat Options:", " --jmxurl Set the JMX URL to connect to.", - " --pid Set the pid to connect to (only on Sun JVM).", + " --pid Set the pid to connect to (only on Sun JVM).", " --jmxuser Set the JMX user used for authenticating.", " --jmxpassword Set the JMX password used for authenticating.", " --jmxlocal Use the local JMX server instead of a remote one.", @@ -56,12 +56,13 @@ public class BstatCommand extends QueryCommand { * @param tokens - command arguments * @throws Exception */ + @Override protected void runTask(List tokens) throws Exception { List queryTokens = new ArrayList(); // Find the first non-option token String brokerName = "*"; - for (Iterator i = tokens.iterator(); i.hasNext();) { - String token = (String)i.next(); + for (Iterator i = tokens.iterator(); i.hasNext();) { + String token = i.next(); if (!token.startsWith("-")) { brokerName = token; break; @@ -78,7 +79,7 @@ public class BstatCommand extends QueryCommand { queryTokens.add("--view"); queryTokens.add("BrokerName,Name,connectorName,networkConnectorName,destinationName,destinationType,EnqueueCount," + "DequeueCount,TotalEnqueueCount,TotalDequeueCount,Messages," - + "TotalMessageCount,ConsumerCount,TotalConsumerCount,DispatchCount,Duplex,NetworkTTL"); + + "TotalMessageCount,ConsumerCount,TotalConsumerCount,DispatchCount,Duplex,NetworkTTL,Uptime"); // Call the query command super.parseOptions(queryTokens); @@ -88,6 +89,7 @@ public class BstatCommand extends QueryCommand { /** * Print the help messages for the browse command */ + @Override protected void printHelp() { context.printHelp(helpFile); }