Defining an XA-datasource
There is not much difference between creating a datasource and an XA-datasource. The main differences between these two kinds of data source are linked to subsystem configuration and transactions.
The same concepts explained for the Data-source also apply to the XA-datasource, so we will just see how to define and configure an XA-datasource.
To create an XA-Datasource, you can start with a basic configuration, as follows:
Its name
The JNDI name - used by the application to reference it
The connection properties - connection information to the database are provided as properties, instead of a URL
The credentials to access the database (username and password)
The driver to use
Connect to the CLI and do as follows:
xa-data-source add --name=MySQLXADS --jndi-name=java:jboss/MySQLXADS --driver-name=mysql --user-name=root --password=root --xa-datasource-properties={"ServerName"=>"192.168.59.104","DatabaseName"=>"mysql"}
The preceding command should have added the xa-data...