Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Invoking server stop, start, and reload


In this recipe, we will learn how to stop, start and reload a WildFly instance by invoking a command to the CLI. You may need to stop a server manually to correct a misconfiguration or to redeploy an application. Thus, knowing how to stop, start and reload a server is a must.

Getting ready

Remember, I'm running WildFly remotely, bound to 192.168.59.103 as IP. WildFly is already up and running.

How to do it…

We will walk through the stop, start, restart, and reload commands separately to better explain their invocation, and eventually, the differences. For example, the start command only makes sense when running in the domain mode, as starting WildFly in the standalone mode is a manual operation.

Stop

Open a new terminal window and execute the following commands:

$ cd $WILDFLY_HOME
$ ./bin/jboss-cli.sh -c --controller=192.168.59.103:9990 --user=wildfly --password=cookbook.2015 --command=":shutdown(restart=false)"
{"outcome" => "success"}

Obviously, after...