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

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.

主站蜘蛛池模板: 汾西县| 临潭县| 涪陵区| 壤塘县| 滕州市| 高青县| 邯郸市| 新田县| 当阳市| 图片| 张家界市| 平昌县| 资溪县| 盘山县| 泉州市| 砚山县| 达拉特旗| 山阳县| 南郑县| 株洲县| 萍乡市| 弋阳县| 大荔县| 鞍山市| 广安市| 孝义市| 于都县| 越西县| 贺州市| 兴义市| 孟连| 安陆市| 瓮安县| 汉中市| 香格里拉县| 洪洞县| 阳东县| 株洲县| 调兵山市| 霞浦县| 安泽县|