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. Usesjava.sql.Driver
.Local Tx
datasource. This does not support two phase commit. Usesjava.sql.Driver
. Suitable for a single database or a non-XA-aware resource.XA
datasource. This supports two phase commit. Usesjavx.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
- Navigate to the Datasource type to be added, under Resources → Datasources.
- Click Add a new resource.
- Select the resource template from the drop-down box, and click Continue.
- Enter required parameters of JNDI Name, JDBC Driver Class and Connection URL.
- Optional: Configure extra options for the datasource. For more information about datasource configuration, see the Administration and Configuration Guide.
- Click Save. The datasource is available.
Procedure 4.12. Adding an XA Datasource
- Navigate to the XA Datasource type, Resources → Datasources → XA Datasources.
- Click Add a new resource.
- Select the resource template from the drop-down box, and click Continue.
- Enter required parameters of JNDI Name and XA DataSource Class.
- Optional: Configure extra options for the datasource. For more information about datasource configuration, see the Administration and Configuration Guide.
- Click Save. The XA datasource is available.