Shutting Down the
Now that you know how to start the server and
look at it using the JMX Console, you need to know how to shut it
down properly. It's really pretty simple, so let's get to it.
How do I do that?
You can shut down the server in three ways:
Use the JMX Console to go to the
domain and choose the
MBean link. On the MBean page, scroll down to the operations
section and click the "Invoke" button for the
Run the shutdown script for your platform in the
same directory where you found the run script.
in the same console window where you started JBoss.
When JBoss is
, you'll see the following
03:50:02,412 INFO [Server] Shutdown complete
You can verify that JBoss has stopped by trying
to access the server in your web browser. You won't be able to
connect because the server is not running anymore.
Just as you would expect, the application server
shut down. You also learned three different ways to stop JBoss, and
you got to see another useful MBean. Of those three ways, when
should you use one or the other?
shutdown script is in the bin directory with the startup script!
The twiddle script is a program for "twiddling" with a remote JBoss
In development, the Ctrl-c option is the
because you will likely have an
terminal window running JBoss.
However, if JBoss is running as a service,
on a remote
machine, you'll need to use one of the other options. If you have
shell access to the machine, the shutdown script will work fine.
You can also use the shutdown command to shut down a remote JBoss
instance, but this requires a local JBoss installation and a few
extra command-line arguments. For remote machines, it's often more
convenient to just use the JMX Console. If you keep a bookmark set
to the ServerInfo MBean, it can be a very quick process. In the
end, each option serves the needs of different types of users, so
just choose whatever is most