The directories under JBOSS_HOME/server
are called "configurations", and represent the configuration of a single instance of the JBoss server. When you start JBoss instance using run.sh -c serverX
(or whatever your startup script looks like), the -c serverX
refers to the configuration in server/serverX
, and a JBoss will be started using server/serverX
as its configuration.
When you shutdown a JBoss instance, the shutdown script doesn't refer to one of the configurations, it actually opens a network connection to the running server and tells it to shut down. So if only one server is running, that's the one that will be shutdown. If multiple servers are running at the same time, they must, by necessity, be running on different IP addresses or ports, and so the shutdown script must know which address/port to use to talk to that server.
JBoss provides no means to start/stop multiple servers at once - each one is a separate OS proces that you need to manage yourself.