From 17ffcd48c23be1fdb889599bee584f6a715991a8 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Wed, 8 Jun 2016 14:15:13 -0400 Subject: [PATCH 1/2] fixing log.trace --- .../core/paging/cursor/impl/PageSubscriptionImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java index 80ed67e4c6..9eac4ce5f4 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java @@ -592,8 +592,11 @@ final class PageSubscriptionImpl implements PageSubscription { return true; } else { - logger.tracef("isComplete(%d)::calling is %s", (Object)page, this, consumedPages.isEmpty()); - return info != null && info.isDone(); + boolean isDone = info != null && info.isDone(); + if (logger.isTraceEnabled()) { + logger.tracef("isComplete(%d):: found info=%s, isDone=%s", (Object) page, info, isDone); + } + return isDone; } } } From 76af1f33d0bda9870bc5ced066444dfc71a29376 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Wed, 8 Jun 2016 13:56:45 -0400 Subject: [PATCH 2/2] ARTEMIS-564 Fixing runtime with folders & spaces https://issues.apache.org/jira/browse/ARTEMIS-564 --- .../activemq/artemis/cli/commands/Stop.java | 10 +++------- .../artemis/cli/commands/bin/artemis-service | 4 ++-- .../cli/commands/bin/artemis-service.xml | 15 +++++++++------ .../artemis/cli/commands/bin/artemis.cmd | 18 +++++++++--------- .../cli/commands/etc/artemis.profile.cmd | 5 +++-- .../src/main/resources/README.html | 2 -- .../src/main/resources/bin/artemis.cmd | 8 ++++---- 7 files changed, 30 insertions(+), 32 deletions(-) diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java index 800c0cf856..5f89253707 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java @@ -19,6 +19,7 @@ package org.apache.activemq.artemis.cli.commands; import java.io.File; import io.airlift.airline.Command; +import org.apache.activemq.artemis.dto.BrokerDTO; @Command(name = "stop", description = "stops the broker instance") public class Stop extends Configurable { @@ -26,14 +27,9 @@ public class Stop extends Configurable { @Override public Object execute(ActionContext context) throws Exception { super.execute(context); + BrokerDTO broker = getBrokerDTO(); - String value = getConfiguration(); - - if (value != null && value.startsWith("xml:")) { - value = value.substring("xml:".length()); - } - - File file = new File(value).getParentFile(); + File file = broker.server.getConfigurationFile().getParentFile(); File stopFile = new File(file, "STOP_ME"); diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service index e88396f404..af384b9649 100755 --- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service @@ -96,9 +96,9 @@ start() { fi if [ -z "$ARTEMIS_USER" -o `id -un` = "$ARTEMIS_USER" ] ; then - nohup ${ARTEMIS_INSTANCE}/bin/artemis run > /dev/null 2> /dev/null & + nohup "${ARTEMIS_INSTANCE}/bin/artemis" run > /dev/null 2> /dev/null & else - sudo -n -u ${ARTEMIS_USER} nohup ${ARTEMIS_INSTANCE}/bin/artemis run > /dev/null 2> /dev/null & + sudo -n -u ${ARTEMIS_USER} nohup "${ARTEMIS_INSTANCE}/bin/artemis" run > /dev/null 2> /dev/null & fi echo $! > "${PID_FILE}" diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml index dfb802329c..593a5094a5 100644 --- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml @@ -22,10 +22,14 @@ ActiveMQ Artemis: ${artemis.instance.name} @ ${host} Apache ActiveMQ Artemis is a reliable messaging broker + + + ${artemis.instance}\log roll java + -Xbootclasspath/a:%ARTEMIS_HOME%\lib\${logmanager} -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods @@ -40,13 +44,12 @@ --> -classpath - "${artemis.home}\lib\artemis-boot.jar" - -Dartemis.home="${artemis.home}" - -Dartemis.instance="${artemis.instance}" - -Ddata.dir="${artemis.instance}\data" + %ARTEMIS_HOME%\lib\artemis-boot.jar + -Dartemis.home=%ARTEMIS_HOME% + -Dartemis.instance=%ARTEMIS_INSTANCE% -Djava.util.logging.manager=org.jboss.logmanager.LogManager - -Dlogging.configuration="file:${artemis.instance}\etc\logging.properties" - -Djava.security.auth.login.config="${artemis.instance}\etc\login.config" + -Dlogging.configuration=file:%ARTEMIS_INSTANCE%\etc\logging.properties + -Djava.security.auth.login.config=%ARTEMIS_INSTANCE%\etc\login.config