6.4. XA Datasources
6.4.1. Create an XA Datasource with the Management Interfaces
Prerequisites:
Summary
This topic covers the steps required to create an XA datasource, using either the Management Console or the Management CLI.
Note
Prior to version 10.2 of the Oracle datasource, the <no-tx-separate-pools/> parameter was required, as mixing non-transactional and transactional connections would result in an error. This parameter may no longer be required for certain applications.
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 the Subsystems menu on the left of the console, then expand the Connector menu.
- Select Datasources.
- Select the XA Datasource tab.
Create a new XA datasource
- Click Add.
- Enter the new XA datasource attributes in the Create XA Datasource wizard and click Next.
- Enter the JDBC driver details in the Create XA Datasource wizard and click Next.
- Enter the XA properties and click Next.
- Enter the connection settings in the Create XA Datasource wizard.
- Click the Test Connection button to test the connection to the XA datasource and verify the settings are correct.
- Click Done to finish
Result
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: