Datasources are generally databases. In order to make datasources available to applications in the Enterprise Web 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 Web Platform instance:
No Txdatasource. This does not take part in JTA transactions. Usesjava.sql.Driver.Local Txdatasource. This does not support two phase commit. Usesjava.sql.Driver. Suitable for a single database or a non-XA-aware resource.XAdatasource. This supports two phase commit. Usesjavx.sql.XADataSource.
Adding a datasource to the Enterprise Web Platform makes it available for use by applications on the instance. To add a datasource, use the following procedure.
Procedure 4.10. Adding a Local Tx or No Tx Datasource
- Navigate to the Datasource type to be added, under → .
- Click .
- Select the resource template from the drop-down box, and click .
- 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 . The datasource is available.
Procedure 4.11. Adding an XA Datasource
- Navigate to the XA Datasource type, → → .
- Click .
- Select the resource template from the drop-down box, and click .
- 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 . The XA datasource is available.