5 Replies Latest reply on May 2, 2017 11:09 AM by benboss

    Stopping Jboss AS 7.1.1 service

    benboss

      Hi there,

       

      There is no shutdown.bat in 7.1.1.

       

      I need to be able to stop the Jboss running as a service from the services.msc    and without using the cli and not doing a Ctrl+C

       

      Has anyone already written something that shutsdown jboss 7.1.1. as a service without using the cli?

       

      Also ultimately I want to using Wildfly , does wildfly have a shutdown.bat ? I've not checked.

       

      Thanks

        • 1. Re: Stopping Jboss AS 7.1.1 service
          ctomc

          Just run:

           

          jboss-cli.bat -c command=:shutdown

           

          and it will stop the server.

          • 2. Re: Stopping Jboss AS 7.1.1 service
            benboss

            I don't want to use the cli.

             

            Rightly or wrongly I've cloned the shutdown.bat from JBoss AS 5 which uses jbossall-client.jar and adapted and incorporated into my JBoss AS 7.1.1

             

            Is seems to work. I'll do a bit more testing but it I can stop and start the Jboss 7 service from services.msc in windows.

             

            Stopping and Starting the Jboss AS 7.1.1 service via service.msc now starts up and shuts down the Java.exe for the JVM and the Jbosssvc.exe

             

            Obviously I've downloaded the jboss-native-2.0.10-windows-x64-ssl.zip

            • 3. Re: Stopping Jboss AS 7.1.1 service
              ctomc

              what is so different between calling shutdown.bat

              or calling jboss-cli.bat with extra params? it is the same thing.

              • 4. Re: Stopping Jboss AS 7.1.1 service
                frito

                You can even shut down the server using HTTP, e.g. using this curl command:

                 

                curl --digest -D - http://adminuser:password@localhost:9990/management/ -d '{"operation":"shutdown"}' -HContent-Type:application/json

                 

                But I am with Tomaz. What is the difference of calling on or another bat?

                • 5. Re: Stopping Jboss AS 7.1.1 service
                  benboss

                  Thank you for all your responses.

                   

                  The reason I wanted to run a shutdown.bat rather than the cli is because after our installer has installed our product and deployed the .war files I want to remove the cli so one has access to it.

                   

                  So I needed to be able to start and stop jboss as window service without the cli being there.

                   

                  I've achieved this now.