Reload or restart of the server using CLI
The difference between a reload and a restart:
-
reload:
-
stops all applications and internal services in the application server
-
reads the configurations
-
starts everything again without starting a new Java process
-
-
restart:
-
stops the whole application server
-
starts it again as a new Java process
-
The application server always notifies you if a reload is required.
A reload can be achieved by using jboss-cli for a single command execution with the following command:
--command=":reload"
A restart can be achieved by using jboss-cli for a single command execution with the following command:
--command=":shutdown(restart=true)"
In both cases it is required to wait till the application server is reloaded or restarted before executing the next script or using the application server.
To check that the server is available, the following methods are recommended:
-
using the approach: Checking the status of a running application server
-
checking the application server log (server.log) for the line indicating the start of the server:
-
WildFly:
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full xx.y.z.Final (WildFly Core x.y.z.Final) started in XXXX ms - Started XXXX of XXXX services (XXX services are lazy, passive or on-demand)
-
JBoss:
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP x.y.z.GA (WildFly Core x.y.z.Final-redhat-00001) started in XXXX ms - Started XXXX of XXXX services (XXX services are lazy, passive or on-demand)
-
Recommendation whether to restart or reload in case you are unsure:
-
If ImageMaster is already deployed, restart the application server after a change.
-
Otherwise, a reload is enough.