jbossas/jboss-as — pull request #797 by bstansberry (2011-12-04 14:30:15+00:00)
Title: AS7-346 Admin-only mode (FKA 'Management mode')

Allows use of the management APIs to update configurations without also bringing up services that handle non-management requests.

See https://issues.jboss.org/browse/AS7-346 and subtasks https://issues.jboss.org/browse/AS7-379 and https://issues.jboss.org/browse/AS7-380.

1) Adds a --admin-only startup switch to a standalone server that puts the server in a mode where services not potentially related to management are not started. Changes made via the management API are persisted to the config but subsystem changes don't update the runtime.

2) Adds a param "admin-only=true|false" to the server :reload operation. Allows moving a server into / out of the admin-only running mode without a full process restart.

3) Adds a --admin-only startup switch to a host controller. In this running mode the HC will not start servers and, if it is master, will not accept registrations from slave HCs. A slave HC in admin-only running mode will still register with the master.

4) Adds a :reload op to the HC. The op includes an optional "admin-only=true|false" param. Reloading an HC involves stopping all of its servers. (As a future enhancement I'll look at making that configurable, although my expectation is for the foreseeable future switching into 'admin-only' running mode will require stopping servers.)

5) An HC starting in admin-only mode does not need to have a configuration, since the domain.xml details are only needed for starting servers. Users can use the management APIs to configure the domain controller connection following boot and the reload to trigger the connection to the master or the load of domain.xml if the local host is the master.

This patch is fairly large. I made an effort to organize the commits into coherent chunks. So people reviewing this may benefit from looking at the commit messages to get a sense of the progression and then looking commit by commit.