官术网_书友最值得收藏!

  • 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.

主站蜘蛛池模板: 牡丹江市| 耿马| 磐石市| 兰西县| 大连市| 富平县| 尚义县| 井陉县| 嘉禾县| 博湖县| 娄底市| 菏泽市| 镇赉县| 蓬溪县| 乌拉特后旗| 股票| 仁寿县| 松原市| 宜章县| 宝鸡市| 武清区| 金堂县| 武夷山市| 罗甸县| 黄大仙区| 台湾省| 呈贡县| 习水县| 宣化县| 徐水县| 宜州市| 依兰县| 潞城市| 乐山市| 鄂托克旗| 金阳县| 洛扎县| 伊川县| 探索| 文水县| 巴林右旗|