activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1367 Add LOG to the Critical Analyzer policies
Date Wed, 23 Aug 2017 01:38:07 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master c54a26da3 -> 47485ce80


ARTEMIS-1367 Add LOG to the Critical Analyzer policies


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/24974550
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/24974550
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/24974550

Branch: refs/heads/master
Commit: 249745506e4674987a1927399300cb67e3c04890
Parents: c54a26d
Author: Francesco Nigro <nigro.fra@gmail.com>
Authored: Tue Aug 22 17:37:01 2017 +0200
Committer: Francesco Nigro <nigro.fra@gmail.com>
Committed: Tue Aug 22 17:37:01 2017 +0200

----------------------------------------------------------------------
 .../artemis/cli/commands/etc/broker.xml         |   2 +-
 .../config/ActiveMQDefaultConfiguration.java    |   6 +-
 .../api/config/CriticalAnalyzerPolicy.java      |  22 ++++
 .../artemis/core/config/Configuration.java      |   5 +-
 .../core/config/impl/ConfigurationImpl.java     |  11 +-
 .../deployers/impl/FileConfigurationParser.java |   3 +-
 .../core/server/ActiveMQServerLogger.java       |   4 +
 .../core/server/impl/ActiveMQServerImpl.java    | 120 ++++++++++++-------
 .../resources/schema/artemis-configuration.xsd  |  13 +-
 .../core/config/impl/FileConfigurationTest.java |   3 +-
 .../resources/ConfigurationTest-full-config.xml |   2 +-
 docs/user-manual/en/configuration-index.md      |   2 +-
 docs/user-manual/en/critical-analysis.md        |  20 ++--
 13 files changed, 147 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
index adabf85..241c354 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
@@ -66,7 +66,7 @@ ${ping-config.settings}${journal-buffer.settings}${connector-config.settings}
 
       <critical-analyzer-check-period>60000</critical-analyzer-check-period>
 
-      <critical-analyzer-halt>true</critical-analyzer-halt>
+      <critical-analyzer-policy>HALT</critical-analyzer-policy>
 
 ${global-max-section}
       <acceptors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index 7e6684b..226ccc4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -481,7 +481,7 @@ public final class ActiveMQDefaultConfiguration {
 
    public static final long DEFAULT_ANALYZE_CRITICAL_TIMEOUT = 120000;
 
-   public static final boolean DEFAULT_ANALYZE_CRITICAL_HALT = false;
+   public static final CriticalAnalyzerPolicy DEFAULT_ANALYZE_CRITICAL_POLICY = CriticalAnalyzerPolicy.LOG;
 
    /**
     * If true then the ActiveMQ Artemis Server will make use of any Protocol Managers that
are in available on the classpath. If false then only the core protocol will be available,
unless in Embedded mode where users can inject their own Protocol Managers.
@@ -1303,8 +1303,8 @@ public final class ActiveMQDefaultConfiguration {
       return timeout / 2;
    }
 
-   public static boolean getCriticalAnalyzerHalt() {
-      return DEFAULT_ANALYZE_CRITICAL_HALT;
+   public static CriticalAnalyzerPolicy getCriticalAnalyzerPolicy() {
+      return DEFAULT_ANALYZE_CRITICAL_POLICY;
    }
 
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
new file mode 100644
index 0000000..d577bd6
--- /dev/null
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/CriticalAnalyzerPolicy.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.api.config;
+
+public enum CriticalAnalyzerPolicy {
+   HALT, SHUTDOWN, LOG;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
index e4c6c01..ceba754 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
@@ -23,6 +23,7 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
+import org.apache.activemq.artemis.api.config.CriticalAnalyzerPolicy;
 import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration;
 import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -87,9 +88,9 @@ public interface Configuration {
 
    Configuration setCriticalAnalyzerCheckPeriod(long checkPeriod);
 
-   boolean isCriticalAnalyzerHalt();
+   CriticalAnalyzerPolicy getCriticalAnalyzerPolicy();
 
-   Configuration setCriticalAnalyzerHalt(boolean halt);
+   Configuration setCriticalAnalyzerPolicy(CriticalAnalyzerPolicy policy);
 
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
index e675606..3ae82d6 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
@@ -41,6 +41,7 @@ import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.api.config.CriticalAnalyzerPolicy;
 import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration;
 import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -296,7 +297,7 @@ public class ConfigurationImpl implements Configuration, Serializable
{
 
    private boolean criticalAnalyzer = ActiveMQDefaultConfiguration.getCriticalAnalyzer();
 
-   private boolean criticalAnalyzerHalt = ActiveMQDefaultConfiguration.getCriticalAnalyzerHalt();
+   private CriticalAnalyzerPolicy criticalAnalyzerPolicy = ActiveMQDefaultConfiguration.getCriticalAnalyzerPolicy();
 
    private long criticalAnalyzerTimeout = ActiveMQDefaultConfiguration.getCriticalAnalyzerTimeout();
 
@@ -2109,13 +2110,13 @@ public class ConfigurationImpl implements Configuration, Serializable
{
    }
 
    @Override
-   public boolean isCriticalAnalyzerHalt() {
-      return criticalAnalyzerHalt;
+   public CriticalAnalyzerPolicy getCriticalAnalyzerPolicy() {
+      return criticalAnalyzerPolicy;
    }
 
    @Override
-   public Configuration setCriticalAnalyzerHalt(boolean halt) {
-      this.criticalAnalyzerHalt = halt;
+   public Configuration setCriticalAnalyzerPolicy(CriticalAnalyzerPolicy policy) {
+      this.criticalAnalyzerPolicy = policy;
       return this;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index 9e1e807..5c17ed8 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -31,6 +31,7 @@ import java.util.Set;
 
 import org.apache.activemq.artemis.ArtemisConstants;
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.api.config.CriticalAnalyzerPolicy;
 import org.apache.activemq.artemis.api.core.BroadcastEndpointFactory;
 import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration;
 import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
@@ -614,7 +615,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
{
 
       config.setCriticalAnalyzerCheckPeriod(getLong(e, "critical-analyzer-check-period",
config.getCriticalAnalyzerCheckPeriod(), Validators.GE_ZERO));
 
-      config.setCriticalAnalyzerHalt(getBoolean(e, "critical-analyzer-halt", config.isCriticalAnalyzerHalt()));
+      config.setCriticalAnalyzerPolicy(CriticalAnalyzerPolicy.valueOf(getString(e, "critical-analyzer-policy",
config.getCriticalAnalyzerPolicy().name(), Validators.NOT_NULL_OR_EMPTY)));
 
       parseAddressSettings(e, config);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index 006ad23..65e368c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -1639,6 +1639,10 @@ public interface ActiveMQServerLogger extends BasicLogger {
    @Message(id = 224080, value = "The server process will now be stopped, as component {0}
is not responsive", format = Message.Format.MESSAGE_FORMAT)
    void criticalSystemShutdown(Object component);
 
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 224081, value = "The component {0} is not responsive", format = Message.Format.MESSAGE_FORMAT)
+   void criticalSystemLog(Object component);
+
    @LogMessage(level = Logger.Level.INFO)
    @Message(id = 224076, value = "UnDeploying address {0}", format = Message.Format.MESSAGE_FORMAT)
    void undeployAddress(SimpleString addressName);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index ce1f354..0806626 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -49,6 +49,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.api.config.CriticalAnalyzerPolicy;
 import org.apache.activemq.artemis.api.core.ActiveMQDeleteAddressException;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.Pair;
@@ -171,9 +172,9 @@ import org.apache.activemq.artemis.utils.TimeUtils;
 import org.apache.activemq.artemis.utils.VersionLoader;
 import org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory;
 import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet;
+import org.apache.activemq.artemis.utils.critical.CriticalAction;
 import org.apache.activemq.artemis.utils.critical.CriticalAnalyzer;
 import org.apache.activemq.artemis.utils.critical.CriticalAnalyzerImpl;
-import org.apache.activemq.artemis.utils.critical.CriticalComponent;
 import org.apache.activemq.artemis.utils.critical.EmptyCriticalAnalyzer;
 import org.jboss.logging.Logger;
 
@@ -511,58 +512,95 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          this.getCriticalAnalyzer().start();
       }
 
-      this.getCriticalAnalyzer().addAction((CriticalComponent c) -> {
+      CriticalAction criticalAction = null;
+      final CriticalAnalyzerPolicy criticalAnalyzerPolicy = configuration.getCriticalAnalyzerPolicy();
+      switch (criticalAnalyzerPolicy) {
 
-         if (configuration.isCriticalAnalyzerHalt()) {
-            ActiveMQServerLogger.LOGGER.criticalSystemHalt(c);
-         } else {
-            ActiveMQServerLogger.LOGGER.criticalSystemShutdown(c);
-         }
+         case HALT:
+            criticalAction = criticalComponent -> {
 
-         threadDump();
+               ActiveMQServerLogger.LOGGER.criticalSystemHalt(criticalComponent);
 
-         // on the case of a critical failure, -1 cannot simply means forever.
-         // in case graceful is -1, we will set it to 30 seconds
-         long timeout = configuration.getGracefulShutdownTimeout() < 0 ? 30000 : configuration.getGracefulShutdownTimeout();
+               threadDump();
+
+               // on the case of a critical failure, -1 cannot simply means forever.
+               // in case graceful is -1, we will set it to 30 seconds
+               long timeout = configuration.getGracefulShutdownTimeout() < 0 ? 30000 :
configuration.getGracefulShutdownTimeout();
+
+               Thread notificationSender = new Thread() {
+                  @Override
+                  public void run() {
+                     try {
+                        callBrokerPlugins(hasBrokerPlugins() ? plugin -> plugin.criticalFailure(criticalComponent)
: null);
+                     } catch (Throwable e) {
+                        logger.warn(e.getMessage(), e);
+                     }
+                  }
+               };
+
+               // I'm using a different thread here as we need to manage timeouts
+               notificationSender.start();
 
-         Thread notificationSender = new Thread() {
-            @Override
-            public void run() {
                try {
-                  callBrokerPlugins(hasBrokerPlugins() ? plugin -> plugin.criticalFailure(c)
: null);
-               } catch (Throwable e) {
-                  logger.warn(e.getMessage(), e);
+                  notificationSender.join(timeout);
+               } catch (InterruptedException ignored) {
                }
-            }
-         };
-
-         // I'm using a different thread here as we need to manage timeouts
-         notificationSender.start();
 
-         try {
-            notificationSender.join(timeout);
-         } catch (InterruptedException ignored) {
-         }
+               Runtime.getRuntime().halt(70); // Linux systems will have /usr/include/sysexits.h
showing 70 as internal software error
 
-         if (configuration.isCriticalAnalyzerHalt()) {
-            Runtime.getRuntime().halt(70); // Linux systems will have /usr/include/sysexits.h
showing 70 as internal software error
-         } else {
-            // you can't stop from the check thread,
-            // nor can use an executor
-            Thread stopThread = new Thread() {
-               @Override
-               public void run() {
-                  try {
-                     ActiveMQServerImpl.this.stop();
-                  } catch (Throwable e) {
-                     logger.warn(e.getMessage(), e);
+            };
+            break;
+         case SHUTDOWN:
+            criticalAction = criticalComponent -> {
+
+               ActiveMQServerLogger.LOGGER.criticalSystemShutdown(criticalComponent);
+
+               threadDump();
+
+               // on the case of a critical failure, -1 cannot simply means forever.
+               // in case graceful is -1, we will set it to 30 seconds
+               long timeout = configuration.getGracefulShutdownTimeout() < 0 ? 30000 :
configuration.getGracefulShutdownTimeout();
+
+               Thread notificationSender = new Thread() {
+                  @Override
+                  public void run() {
+                     try {
+                        callBrokerPlugins(hasBrokerPlugins() ? plugin -> plugin.criticalFailure(criticalComponent)
: null);
+                     } catch (Throwable e) {
+                        logger.warn(e.getMessage(), e);
+                     }
                   }
+               };
+
+               // I'm using a different thread here as we need to manage timeouts
+               notificationSender.start();
+
+               try {
+                  notificationSender.join(timeout);
+               } catch (InterruptedException ignored) {
                }
+
+               // you can't stop from the check thread,
+               // nor can use an executor
+               Thread stopThread = new Thread() {
+                  @Override
+                  public void run() {
+                     try {
+                        ActiveMQServerImpl.this.stop();
+                     } catch (Throwable e) {
+                        logger.warn(e.getMessage(), e);
+                     }
+                  }
+               };
+               stopThread.start();
             };
-            stopThread.start();
+            break;
+         case LOG:
+            criticalAction = ActiveMQServerLogger.LOGGER::criticalSystemLog;
+            break;
+      }
 
-         }
-      });
+      this.getCriticalAnalyzer().addAction(criticalAction);
 
       configuration.parseSystemProperties();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/main/resources/schema/artemis-configuration.xsd
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index 03d0896..1c1947d 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -771,7 +771,7 @@
          <xsd:element name="critical-analyzer" type="xsd:boolean" default="true" maxOccurs="1"
minOccurs="0">
             <xsd:annotation>
                <xsd:documentation>
-                  should analyze response time on critical paths and decide for broker shutdown
or halt.
+                  should analyze response time on critical paths and decide for broker log,
shutdown or halt.
                </xsd:documentation>
             </xsd:annotation>
          </xsd:element>
@@ -792,12 +792,19 @@
             </xsd:annotation>
          </xsd:element>
 
-         <xsd:element name="critical-analyzer-halt" type="xsd:boolean" default="false"
maxOccurs="1" minOccurs="0">
+         <xsd:element name="critical-analyzer-policy" default="LOG" maxOccurs="1" minOccurs="0">
             <xsd:annotation>
                <xsd:documentation>
-                  Should the server be shutdown or halted upon critical analysis failure.
+                  Should the server log, be shutdown or halted upon critical analysis failure.
                </xsd:documentation>
             </xsd:annotation>
+            <xsd:simpleType>
+               <xsd:restriction base="xsd:string">
+                  <xsd:enumeration value="LOG"/>
+                  <xsd:enumeration value="HALT"/>
+                  <xsd:enumeration value="SHUTDOWN"/>
+               </xsd:restriction>
+            </xsd:simpleType>
          </xsd:element>
 
          <xsd:element name="security-settings" maxOccurs="1" minOccurs="0">

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
index bdfa291..a26da91 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.api.config.CriticalAnalyzerPolicy;
 import org.apache.activemq.artemis.api.core.BroadcastGroupConfiguration;
 import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
 import org.apache.activemq.artemis.api.core.RoutingType;
@@ -385,7 +386,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
       assertEquals(333, conf.getCriticalAnalyzerCheckPeriod());
       assertEquals(777, conf.getCriticalAnalyzerTimeout());
       assertEquals(false, conf.isCriticalAnalyzer());
-      assertEquals(true, conf.isCriticalAnalyzerHalt());
+      assertEquals(CriticalAnalyzerPolicy.HALT, conf.getCriticalAnalyzerPolicy());
 
       assertEquals(false, conf.isJournalDatasync());
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
index 89b7c74..29742b6 100644
--- a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
+++ b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
@@ -57,7 +57,7 @@
       <global-max-size>1234567</global-max-size>
       <max-disk-usage>37</max-disk-usage>
       <disk-scan-period>123</disk-scan-period>
-      <critical-analyzer-halt>true</critical-analyzer-halt>
+      <critical-analyzer-policy>HALT</critical-analyzer-policy>
       <critical-analyzer-check-period>333</critical-analyzer-check-period>
       <critical-analyzer-timeout>777</critical-analyzer-timeout>
       <critical-analyzer>false</critical-analyzer>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/docs/user-manual/en/configuration-index.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/configuration-index.md b/docs/user-manual/en/configuration-index.md
index c643199..17f1580 100644
--- a/docs/user-manual/en/configuration-index.md
+++ b/docs/user-manual/en/configuration-index.md
@@ -121,7 +121,7 @@ system-property-prefix | Prefix for replacing configuration settings using
Bean
 [critical-analyzer](critical-analysis.md) | Enable or disable the critical analysis (default
true)
 [critical-analyzer-timeout](critical-analysis.md) | Timeout used to do the critical analysis
(default 120000 milliseconds)
 [critical-analyzer-check-period](critical-analysis.md) | Time used to check the response
times (default half of critical-analyzer-timeout)
-[critical-analyzer-halt](critical-analysis.md) | Should the VM be halted upon failures (default
false)
+[critical-analyzer-policy](critical-analysis.md) | Should the server log, be halted or shutdown
upon failures (default `LOG`)
 
 
 #address-setting type

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/24974550/docs/user-manual/en/critical-analysis.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/critical-analysis.md b/docs/user-manual/en/critical-analysis.md
index e867283..443e156 100644
--- a/docs/user-manual/en/critical-analysis.md
+++ b/docs/user-manual/en/critical-analysis.md
@@ -26,28 +26,34 @@ Name | Description
 critical-analyzer | Enable or disable the critical analysis (default true)
 critical-analyzer-timeout | Timeout used to do the critical analysis (default 120000 milliseconds)
 critical-analyzer-check-period | Time used to check the response times (default half of critical-analyzer-timeout)
-critical-analyzer-halt | Should the VM be halted upon failures (default false)
+critical-analyzer-policy | Should the server log, be halted or shutdown upon failures (default
`LOG`)
 
-The default for critical-analyzer-halt is false, however the generated broker.xml will have
it set to true. That is because we cannot halt the VM if you are embedding ActiveMQ Artemis
into an application server or on a multi tenant environment.
+The default for critical-analyzer-policy is `LOG`, however the generated broker.xml will
have it set to `HALT`. That is because we cannot halt the VM if you are embedding ActiveMQ
Artemis into an application server or on a multi tenant environment.
 
-The broker on the distribution will then have it set to true, but if you use it in any other
way the default will be false.
+The broker on the distribution will then have it set to `HALT`, but if you use it in any
other way the default will be `LOG`.
 
 ## What would you expect
 
 - You will see some logs
 
-If you have critical-analyzer-halt=true
+If you have critical-analyzer-policy=HALT
 
 ```
 [Artemis Critical Analyzer] 18:10:00,831 ERROR [org.apache.activemq.artemis.core.server]
AMQ224079: The process for the virtual machine will be killed, as component org.apache.activemq.artemis.tests.integration.critical.CriticalSimpleTest$2@5af97850
is not responsive
 ```
 
-Or if you have critical-analyzer-halt=false
+While if you have critical-analyzer-policy=SHUTDOWN
 
 ```
 [Artemis Critical Analyzer] 18:07:53,475 ERROR [org.apache.activemq.artemis.core.server]
AMQ224080: The server process will now be stopped, as component org.apache.activemq.artemis.tests.integration.critical.CriticalSimpleTest$2@5af97850
is not responsive
 ```
 
+Or if you have critical-analyzer-policy=LOG
+
+```
+[Artemis Critical Analyzer] 18:11:52,145 WARN [org.apache.activemq.artemis.core.server] AMQ224081:
The component org.apache.activemq.artemis.tests.integration.critical.CriticalSimpleTest$2@5af97850
is not responsive
+```
+
 You will see a simple thread dump of the server
 
 ```
@@ -77,9 +83,9 @@ AMQ119003: End Thread dump
 
 ```
 
-- The Server will be halted if configured to halt
+- The Server will be halted if configured to `HALT`
 
-- The system will be stopped if no halt is used:
+- The system will be stopped if `SHUTDOWN` is used:
 * Notice that if the system is not behaving well, there is no guarantees the stop will work.
 
 


Mime
View raw message