4.3. Datasources

Datasources are generally databases. In order to make datasources available to applications in the Enterprise Application Platform, they need to be defined and published using JNDI. For more about datasources, refer to the Administration and Configuration Guide.
Three types of datasources can be added to an Enterprise Application Platform instance:
  • No Tx datasource. This does not take part in JTA transactions. Uses java.sql.Driver.
  • Local Tx datasource. This does not support two phase commit. Uses java.sql.Driver. Suitable for a single database or a non-XA-aware resource.
  • XA datasource. This supports two phase commit. Uses javx.sql.XADataSource.

4.3.1. Add a Datasource

Adding a datasource to the Enterprise Application Platform makes it available for use by applications on the instance. To add a datasource, use the following procedure.

Procedure 4.11. Adding a Local Tx or No Tx Datasource

  1. Navigate to the Datasource type to be added, under ResourcesDatasources.
  2. Click Add a new resource.
  3. Select the resource template from the drop-down box, and click Continue.
  4. Enter required parameters of JNDI Name, JDBC Driver Class and Connection URL.
  5. Optional: Configure extra options for the datasource. For more information about datasource configuration, see the Administration and Configuration Guide.
  6. Click Save. The datasource is available.

Procedure 4.12. Adding an XA Datasource

  1. Navigate to the XA Datasource type, ResourcesDatasourcesXA Datasources.
  2. Click Add a new resource.
  3. Select the resource template from the drop-down box, and click Continue.
  4. Enter required parameters of JNDI Name and XA DataSource Class.
  5. Optional: Configure extra options for the datasource. For more information about datasource configuration, see the Administration and Configuration Guide.
  6. Click Save. The XA datasource is available.