- WildFly Cookbook
- Luigi Fugaro
- 257字
- 2021-07-16 13:38:16
Reloading a server configuration via the CLI
In this recipe, we will learn how to reload the server configuration, without the need for a full restart. Often, there are changes that need the server to be reloaded. Most of the time you realize that a specific setting needs a different value just after a server startup or during tests. So, instead of stopping and starting the all application server, you can just reload the configuration, unless the change involves the JVM or settings that are needed at boot time.
Getting ready
We have already seen how to reload a server while playing with IPs and port binding, but it's worth mentioning again.
How to do it…
The command itself is pretty easy:
$ ./bin/jboss-cli.sh --connect [standalone@localhost:9990 /] reload [standalone@localhost:9990 /]
How it works…
Basically, the reload
command issues, in sequence, a stop
for all the WildFly active services and a start
, which starts up the services again. This should give you important information. The JVM remains the same. If you test the active process at the OS level before and after issuing the reload
command, you will notice that the processes' IDs are the same.
$ ps -efa | grep java | grep -v grep luigi 4915 4879 80 16:07 pts/3 00:00:11 /home/luigi/WFC/jdk8/bin/java -D[Standalone] -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/home/luigi/WFC/wildfly/standalone/log/server.log -Dlogging.configuration=file:/home/luigi/WFC/wildfly/standalone/configuration/logging.properties -jar /home/luigi/WFC/wildfly/jboss-modules.jar -mp /home/luigi/WFC/wildfly/modules org.jboss.as.standalone -Djboss.home.dir=/home/luigi/WFC/wildfly -Djboss.server.base.dir=/home/luigi/WFC/wildfly/standalone luigi 5031 5023 36 16:07 pts/2 00:00:01 /home/luigi/WFC/jdk8/bin/java -Djboss.modules.system.pkgs=com.sun.java.swing -Dlogging.configuration=file:/home/luigi/WFC/wildfly/bin/jboss-cli-logging.properties -jar /home/luigi/WFC/wildfly/jboss-modules.jar -mp /home/luigi/WFC/wildfly/modules org.jboss.as.cli --connect
Last but not least, your CLI does not disconnect.
- 企業(yè)級Java EE架構設計精深實踐
- PyTorch自動駕駛視覺感知算法實戰(zhàn)
- HTML5 移動Web開發(fā)從入門到精通(微課精編版)
- Python高效開發(fā)實戰(zhàn):Django、Tornado、Flask、Twisted(第3版)
- 深入淺出RxJS
- Java 9模塊化開發(fā):核心原則與實踐
- 編程數學
- Raspberry Pi Home Automation with Arduino(Second Edition)
- 從零開始學C#
- Django 3.0入門與實踐
- Rust游戲開發(fā)實戰(zhàn)
- Python 3.7從入門到精通(視頻教學版)
- 小型編譯器設計實踐
- 大學計算機基礎實驗指導
- FusionCharts Beginner’s Guide:The Official Guide for FusionCharts Suite