How to shut down JBoss from remote ?

JBoss recipe of the day

JBoss can be shut down remotely using the twiddle command line utility.

Just add the  -s option to specify the host you are trying to talk to:
Windows Users:
C:\jboss-4.2.2.GA\bin>twiddle -s localhost invoke “jboss.system:type=Server” shutdown
Unix Users:
[bin]$ ./ -s hostname invoke jboss.system:type=Server shutdown

The command will return “null” and JBoss will start shutting down…..