6.4. XA Datasources

6.4.1. Create an XA Datasource with the Management Interfaces

Task 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. Task

    • Management CLI

      1. 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
      2. Configure the XA datasource properties

        1. 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)
        2. 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)
      3. Enable the datasource:
        xa-data-source enable --name=XA_DATASOURCE_NAME
    • Management Console

      1. Navigate to the Datasources panel in the Management Console

          • Standalone Mode

            Select the Profile tab from the top-right of the console.
          • Domain Mode

            1. Select the Profiles tab from the top-right of the console.
            2. Select the appropriate profile from the drop-down box in the top left.
            3. Expand the Subsystems menu on the left of the console.
        1. Select ConnectorDatasources from the menu on the left of the console.
        Datasources panel

        Figure 6.4. Datasources panel

      2. Select the XA Datasource panel.
      3. Create a new XA datasource

        1. Select the Add button at the top of the XA Datasources panel.
        2. Enter the new XA datasource attributes in the Create XA Datasource wizard and proceed with the Next button.
        3. Enter the JDBC driver details in the Create XA Datasource wizard and proceed with the Next button.
        4. Edit the XA properties and proceed with the Next button.
        5. Enter the connection settings in the Create XA Datasource wizard and select the Done button.
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.