Java Reference
In-Depth Information
[disconnected /] connect
Connected to localhost:9999
[localhost:9999 /] :shutdown
Locating the shutdown script
There is actually one more option to shut down the application server that is pretty
useful if you need to shut down the server from within a script. This option consists
of passing the
--connect
option to the admin shell, thereby switching off the inter-
active mode:
jboss-cli.bat --connect command=:shutdown
# Windows
jboss-cli.sh --connect command=:shutdown
# Unix / Linux
Stopping JBoss on a remote machine
Shutting down the application server, which is running on a remote machine, is just
a matter of providing the server's remote address to the CLI, and for security reason,
a username and password (See next chapter to learn more about user creation):
[disconnected /] connect 192.168.1.10
Authenticating against security realm:
ManagementRealm
Username: admin1234
Password:
Connected to 192.168.1.10:9999
[192.168.1.10:9999 / ] :shutdown
Restarting JBoss
The command-line interface contains many useful commands. One of the most in-
teresting options is the ability to reload the AS configuration or parts of it using the
reload
command.
When issued on the
root node path
of the AS server, it is able to reload the services'
configuration: