I am wondering if it is possible to use extensions to define subsystems that can be used to add management resources when starting WildFly or deploying applications. One example of what I would am looking to do is to dynamically add data sources at startup or application deployment so that they are ready for other applications to access when they are deployed. I have previously written about some issues I have had with dynamic data source configuration at startup/deployment in migrating from JBoss AS 4.2.2 to WildFly 9.0.2. The two posts about this subject can be found here:
WildFly 9.0.2 MBean Data Source Dependencies
WildFly 9.0.2 MBean Start Method Timeout/Deadlock
I am looking into using extension as an alternative to the MBean that does the configuration that I describe in these posts.
Another example would be using a DeploymentUnitProcessor to add JMS destinations whose configuration data is provided in some form by the DeploymentUnit being processed.
I have read this documentation on extending WildFly:
Extending WildFly - WildFly 9 - Project Documentation Editor
It is a useful guide for getting started developing extensions; however, I would like to know more about extensions. For example, is it possible to execute management operations from extension code and, if so, when is it legal to do this and how would this be done. I would especially like to know more about the classes and interfaces that are identified, but not really described in the "Key Interfaces and Classes Relevant to Extension Developers" section of the article, as well as any others not identified.
I would appreciate any information about what I am looking to do with extensions, even if it is to simply say if it is possible or not, and any additional resources on extension development.