Is there an example somewhere of getting access to the mgmt api from
a
deployed servlet app? I'd like to be able to manage subsystem
configuration and store it (within standalone.xml or whatever).
You can take a look at RHQ's DMR client library. It was written to be a generic DMR
client to access the mgmt API.
https://git.fedorahosted.org/cgit/rhq/rhq.git/tree/modules/common/jboss-a...
Obtain a ModelControllerClient "somehow" (see MCCHelper, for example) and pass
it to the constructor for the different types of clients (DatasourceJBossASClient,
CoreJBossASClient, SecurityDomainJBossASClient, etc, etc)
Then there is my blog from 2012 that talks about getting a co-located
ModelControllerClient that may be of help:
http://management-platform.blogspot.com/2012/07/co-located-management-cli...
Anyway, the code in those places can serve as examples that you are asking for. We do use
these from within servlets and EJBs running in EAP 6.