https://issues.apache.org/jira/browse/AMQ-3682 - use jmxLocal for karaf commands by default

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1236227 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2012-01-26 15:10:57 +00:00
parent a1e961d09c
commit 55fa377f2f
2 changed files with 8 additions and 9 deletions

View File

@ -22,7 +22,7 @@ log4j.rootLogger=INFO, out, stdout
#log4j.logger.org.apache.activemq.broker.scheduler=DEBUG
#log4j.logger.org.apache.activemq.network.DemandForwardingBridgeSupport=DEBUG
#log4j.logger.org.apache.activemq=TRACE
log4j.logger.org.apache.activemq.transport.failover=TRACE
#log4j.logger.org.apache.activemq.store.jdbc=TRACE
#log4j.logger.org.apache.activemq.broker.region.cursors.AbstractStoreCursor=DEBUG
#log4j.logger.org.apache.activemq.store.jdbc.JDBCMessageStore=DEBUG

View File

@ -16,15 +16,13 @@
*/
package org.apache.activemq.karaf.commands;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import org.apache.activemq.console.CommandContext;
import org.apache.activemq.console.command.Command;
import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
import org.apache.activemq.console.CommandContext;
import org.apache.karaf.shell.console.OsgiCommandSupport;
import org.apache.felix.gogo.commands.Argument;
import org.apache.karaf.shell.console.OsgiCommandSupport;
import java.util.ArrayList;
/**
* @version $Rev: 960482 $ $Date: 2010-07-05 10:28:33 +0200 (Mon, 05 Jul 2010) $
@ -34,7 +32,7 @@ public class ActiveMQCommandSupport extends OsgiCommandSupport {
private Command command;
@Argument(index=0, multiValued=true, required=true)
private Collection<String> arguments;
private ArrayList<String> arguments = new ArrayList<String>();
protected Object doExecute() throws Exception {
CommandContext context2 = new CommandContext();
@ -43,7 +41,8 @@ public class ActiveMQCommandSupport extends OsgiCommandSupport {
try {
currentCommand.setCommandContext(context2);
currentCommand.execute(arguments != null ? new ArrayList<String>(arguments) : new ArrayList<String>());
arguments.add("--jmxlocal");
currentCommand.execute(arguments);
return null;
} catch (Throwable e) {
Throwable cur = e;