I have an application which dynamically adds databases for each instance of the application, and which then, on JBoss 5 would write a datasource file out into the deploy folder,
In newer version of JBoss AS7 -ds.xml strategy will work.
But management CLI offer you another way to perform it (as they will be no scanning delay it is probably a more recommended way).
You can either call jboss-cli.sh with command file (detail on how to do it can be found here: http://planet.jboss.org/post/how_to_create_an_manage_datasources_in_as7) or you can use the directly the native API (https://docs.jboss.org/author/display/AS71/The+native+management+API).
With the later method in addition to add, you will be able to query the existing data sources and update them.