- 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.
- 數(shù)據(jù)結(jié)構(gòu)和算法基礎(chǔ)(Java語言實現(xiàn))
- Silverlight魔幻銀燈
- Web程序設(shè)計(第二版)
- Java編程的邏輯
- Java系統(tǒng)化項目開發(fā)教程
- Advanced Express Web Application Development
- RealSenseTM互動開發(fā)實戰(zhàn)
- Clojure for Java Developers
- Webpack實戰(zhàn):入門、進階與調(diào)優(yōu)(第2版)
- 零代碼實戰(zhàn):企業(yè)級應(yīng)用搭建與案例詳解
- SAS編程演義
- Go Systems Programming
- Python數(shù)據(jù)預(yù)處理技術(shù)與實踐
- C/C++程序設(shè)計教程
- 開源網(wǎng)絡(luò)地圖可視化:基于Leaflet的在線地圖開發(fā)