[wildfly-dev] access to mgmt api/services

Bill Burke bburke at redhat.com
Mon Jan 27 17:45:24 EST 2014



On 1/27/2014 5:40 PM, John Mazzitelli wrote:
>> 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-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller
>
> 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-client-for.html
>
> 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.
>

Thanks for the links!

What about sharing a "service" between different applications?  i.e. a 
shared service like the TxMgr.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the wildfly-dev mailing list