Container support
Here are the configurations that currently support DataSource or Resource configuration:
This page / section has been automatically generated by Cargo's build. Do not edit it directly as it'll be overwritten next time it's generated again. |
Container | Configuration | Resource | DataSource | Transactional DataSource | XA DataSource |
|---|---|---|---|---|---|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
|
Notes:
- Datasource support for Jetty has been implemented in CARGO 1.2.2.
- JOnAS will handle transactions for datasources using its
jtmservice.
DataSource properties
DataSources are added through pipe-delimited configuration properties that starts with cargo.datasource.datasource. Example:
Here are the properties that are valid for this:
- Note that c.d means cargo.datasource
- Note that if you specify a property marked do not set you will get a CargoException.
Property | Purpose | Valid Values | DataSource | Transactional DataSource | XA DataSource |
|---|---|---|---|---|---|
| The path to this datasource in JNDI | Any jndi path, like | mandatory | mandatory | mandatory |
| The implementation class | ex. | mandatory: must implement | mandatory: must implement | mandatory: must implement |
| Properties to pass to the driver | Semi-colon delimited string | optional | optional | mandatory |
| URL for the | ex. | mandatory | mandatory | optional |
| Determines the type of the driver | Defaults to | do not set | do not set |
|
| Determines transaction support type |
| do not set | mandatory | unset defaults to only valid option: |
| Identifier used in configuration files to reference this datasource | Must contain no path-like characters | optional | optional | optional |
| Username to connect to the database | String | optional | optional | optional |
| Password to connect to the database | String | optional | optional | optional |
Resource properties
Resources are added through pipe-delimited configuration properties that starts with cargo.resource.resource. Example:
Here are the properties that are valid for this:
- Note that
c.rmeanscargo.resource
Property | Purpose | Valid Values | Mandatory? |
|---|---|---|---|
| The path to this datasource in JNDI | Any jndi path, like | mandatory |
| Interface of the object | Any valid interface | mandatory |
| The implementation class | Any valid class implementing the interface | mandatory |
| Properties to to populate the class with | Semi-colon delimited string; must correspond to setters | optional |
Examples
Users of the Java API can take a look at the following classes as example:
DataSourceOnStandaloneConfigurationTest: datasource definition.TransactionEmulationDataSourceOnStandaloneConfigurationTest: datasource definition with transaction emulation.XATransactionDataSourceOnStandaloneConfigurationTest: XA datasource definition.ResourceOnStandaloneConfigurationTest: resource definition, showing for examplemailsession.
Users of the Maven2/Maven3 plugin can use the Maven2 Archetype showing datasource support. Please read: Datasource Definition Archetype.