You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by lulf <gi...@git.apache.org> on 2016/08/17 11:49:13 UTC

[GitHub] activemq-artemis pull request #725: Add forceShutdown core management operat...

GitHub user lulf opened a pull request:

    https://github.com/apache/activemq-artemis/pull/725

    Add forceShutdown core management operation

    This is a proposal of an operation to shutdown not just the artemis server but the JVM itself. This feature would allow us to avoid creating a parent process to control the JVM lifecycle. Apologies if there is already some way to do this remotely.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lulf/activemq-artemis lulf/add-jvm-shutdown-operation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/725.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #725
    
----
commit d5378331286cb5fae70aa3003e63d98d6bc4feba
Author: Ulf Lilleengen <lu...@redhat.com>
Date:   2016-08-17T09:51:56Z

    Add forceShutdown core management operation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #725: Add forceShutdown core management operation

Posted by lulf <gi...@git.apache.org>.
Github user lulf commented on the issue:

    https://github.com/apache/activemq-artemis/pull/725
  
    Closing this as https://github.com/apache/activemq-artemis/pull/727 fixes my issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #725: Add forceShutdown core management operat...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/725#discussion_r75193484
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java ---
    @@ -1983,6 +1983,12 @@ public void forceFailover() throws Exception {
        }
     
        @Override
    +   public void forceShutdown() throws Exception {
    +      forceFailover();
    +      System.exit(0);
    --- End diff --
    
    @johnament  We do that already. I guess that's what he wants as part of this feature.
    
    
    I wouldn't call it forceShutdown... I would call it halt.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #725: Add forceShutdown core management operat...

Posted by lulf <gi...@git.apache.org>.
Github user lulf commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/725#discussion_r75256140
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java ---
    @@ -1983,6 +1983,12 @@ public void forceFailover() throws Exception {
        }
     
        @Override
    +   public void forceShutdown() throws Exception {
    +      forceFailover();
    +      System.exit(0);
    --- End diff --
    
    This is indeed what is happening. I originally invoked forceFailover() which calls server.stop(true);  The server prints the message '06:44:24,063 INFO  [org.apache.activemq.artemis.core.server] AMQ221002: Apache ActiveMQ Artemis Message Broker version 1.5.0-SNAPSHOT [2525ae85-650f-11e6-bc19-0242fee3c111] stopped, uptime 23.737 seconds' and continues to run.
    
    I will raise a jira for this then.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #725: Add forceShutdown core management operat...

Posted by lulf <gi...@git.apache.org>.
Github user lulf closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/725


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #725: Add forceShutdown core management operat...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/725#discussion_r75200266
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java ---
    @@ -1983,6 +1983,12 @@ public void forceFailover() throws Exception {
        }
     
        @Override
    +   public void forceShutdown() throws Exception {
    +      forceFailover();
    +      System.exit(0);
    --- End diff --
    
    I'm not sure this operation is safe. It could be useful to destroy a server. Especially when you have embedded systems through Karaf, wildfly and others... 
    
    I -1 for this feature
    
    
    
    If shutdown the Artemis server is preventing the shutdown than it's a bug, but I don't think that's a case. If you see a case where the VM won't shutdown after a server.stop() then it's an issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #725: Add forceShutdown core management operat...

Posted by johnament <gi...@git.apache.org>.
Github user johnament commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/725#discussion_r75113156
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java ---
    @@ -1983,6 +1983,12 @@ public void forceFailover() throws Exception {
        }
     
        @Override
    +   public void forceShutdown() throws Exception {
    +      forceFailover();
    +      System.exit(0);
    --- End diff --
    
    Instead of exiting, can we terminate threads?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---