The method getTemplatePropertyDefinitions, in the class AdminFactory.java.
The datasource name should be "xa-data-source" instead of "data-source" when the datasource is XA. See the code snapshot below:
// get JDBC properties if (isXA(templateName)) { cliCall("read-resource-description", new String[] {"subsystem", "datasources", "data-source", stripXA(templateName)}, null, builder); addXAProperties(props); } else { cliCall("read-resource-description", new String[] {"subsystem", "datasources", "data-source", templateName}, null, builder); addDriverproperties(props); }
Another issue, when reading using the method getDataSource in the class AdminFactory.java, it is not getting the properties recursively. and the connection properties are returned as undefined like below:
"xa-datasource-properties" => { "DatabaseName" => undefined, "PortNumber" => undefined, "ServerName" => undefined }
more details in the following forum discussion link: https://developer.jboss.org/thread/280411?start=15&tstart=0