Thanks for the link, but my problem is when to do this. I implemented the data source handling already using the java CLI api. But I need it on the right phase. It should be after the deployments, so that the data source add/remove will not be blocked. I used the ModelClientController to execute the ModelNode requests. Hope this is not a problem.
I get the data source properties like name etc. dynamically from another system. So I do not deploy static xmls file.
dont use 70 docs for extending but rather 71
if you folow the manual, you get everything you need to get started
or you can also find complete example here https://github.com/jbossas/archetypes/tree/master/jboss-as-subsystem-example