6.4. XA Datasources
6.4.1. Create an XA Datasource with the Management Interfaces
Prerequisites:
This topic covers the steps required to create an XA datasource, using either the Management Console or the Management CLI.
Note
Procedure 6.7. Create an XA Datasource, Using Either the Management CLI or the Management Console
Management CLI
- Run the following command to create an XA datasource, configuring the variables as appropriate:
xa-data-source add --name=XA_DATASOURCE_NAME --jndi-name=JNDI_NAME --driver-name=DRIVER_NAME --xa-datasource-class=XA_DATASOURCE_CLASS
Configure the XA datasource properties
Set the server name
Run the following command to configure the server name for the host:/subsystem=datasources/xa-data-source=XA_DATASOURCE_NAME/xa-datasource-properties=ServerName:add(value=HOSTNAME)
Set the database name
Run the following command to configure the database name:/subsystem=datasources/xa-data-source=XA_DATASOURCE_NAME/xa-datasource-properties=DatabaseName:add(value=DATABASE_NAME)
- Enable the datasource:
xa-data-source enable --name=XA_DATASOURCE_NAME
Management Console
Navigate to the Datasources panel in the Management Console
- Select the Configuration tab from the top of the console.
- For Domain mode only, select a profile from the drop-down box at the top left.
- Expand themenu on the left of the console, then expand the menu.
- Select.
- Select the XA Datasource tab.
Create a new XA datasource
- Click.
- Enter the new XA datasource attributes in the Create XA Datasource wizard and click .
- Enter the JDBC driver details in the Create XA Datasource wizard and click .
- Enter the XA properties and click.
- Enter the connection settings in the Create XA Datasource wizard.
- Click thebutton to test the connection to the XA datasource and verify the settings are correct.
- Clickto finish
The XA datasource has been added to the server. It is now visible in either the standalone.xml
or domain.xml
file, as well as the management interfaces.
See Also: