Did you manage to get things working?
Yes, to support my usecase, no in a generic framework, but this trick can be applied to any connection factory with little work.
All the Connection Factories expose a JMX interface in the JBoss AS, using those you can see what properties are inside a Connection Factory or Data Source. When exposing a "template" for those connection factories, read the these properties and inject them into the template metadata which will be exposed through the profile service to any management applications like JOPR. When writing the template do the reverse, but write the properties that are from "ra.xml" as "config-property" in the "-ds.xml" file.
If you are interested see the code here..
and look for template info stuff here..
a sample ra.xml file here..
Sounds ok, I was also going to suggest you take a look at the jboss.jca:* MBeans for retrieving the required information.
It seems that you are overriding the -ds.xml which will make the -ds.xml to survice the server restart.
I will take a look at the code whenever I get some free time