mirror of https://github.com/apache/activemq.git
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:
parent
a1e961d09c
commit
55fa377f2f
|
@ -22,7 +22,7 @@ log4j.rootLogger=INFO, out, stdout
|
||||||
|
|
||||||
#log4j.logger.org.apache.activemq.broker.scheduler=DEBUG
|
#log4j.logger.org.apache.activemq.broker.scheduler=DEBUG
|
||||||
#log4j.logger.org.apache.activemq.network.DemandForwardingBridgeSupport=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.store.jdbc=TRACE
|
||||||
#log4j.logger.org.apache.activemq.broker.region.cursors.AbstractStoreCursor=DEBUG
|
#log4j.logger.org.apache.activemq.broker.region.cursors.AbstractStoreCursor=DEBUG
|
||||||
#log4j.logger.org.apache.activemq.store.jdbc.JDBCMessageStore=DEBUG
|
#log4j.logger.org.apache.activemq.store.jdbc.JDBCMessageStore=DEBUG
|
||||||
|
|
|
@ -16,15 +16,13 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.karaf.commands;
|
package org.apache.activemq.karaf.commands;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import org.apache.activemq.console.CommandContext;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import org.apache.activemq.console.command.Command;
|
import org.apache.activemq.console.command.Command;
|
||||||
import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
|
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.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) $
|
* @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;
|
private Command command;
|
||||||
|
|
||||||
@Argument(index=0, multiValued=true, required=true)
|
@Argument(index=0, multiValued=true, required=true)
|
||||||
private Collection<String> arguments;
|
private ArrayList<String> arguments = new ArrayList<String>();
|
||||||
|
|
||||||
protected Object doExecute() throws Exception {
|
protected Object doExecute() throws Exception {
|
||||||
CommandContext context2 = new CommandContext();
|
CommandContext context2 = new CommandContext();
|
||||||
|
@ -43,7 +41,8 @@ public class ActiveMQCommandSupport extends OsgiCommandSupport {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
currentCommand.setCommandContext(context2);
|
currentCommand.setCommandContext(context2);
|
||||||
currentCommand.execute(arguments != null ? new ArrayList<String>(arguments) : new ArrayList<String>());
|
arguments.add("--jmxlocal");
|
||||||
|
currentCommand.execute(arguments);
|
||||||
return null;
|
return null;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Throwable cur = e;
|
Throwable cur = e;
|
||||||
|
|
Loading…
Reference in New Issue