I would like to add a resource-adapter (data source) while jboss 7 is up and running. As per the doc, we can add this using CLI command, but is there a way i can configure this through a java program? or Can we add this inside a *-ds.xml file in an ear file which jboss 7 can automatically detect? Could someone please give an example of how this can be done.