...
- Note that
c.d
meanscargo.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 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 datasourceDataSource | 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 |
...
The Glassfish container has various known issues with regards to datasource DataSource support.
When you try to use Glassfish GlassFish 3.x or Glassfish GlassFish 4.x with Derby datasourcesDataSources, you might run into issues where Glassfish doesn't start, and the Glassfish logs show you messages such as the below:
...
ConfigurationFixtureFactory
: class with method static methods showing example examples for creating various datasource various DataSource and resource types:createDataSource
andcreateAnotherDataSource
: Creation of a DataSourcecreateDriverConfiguredDataSourceWithLocalTransactionSupport
: Creation of a DataSource with local transaction supportcreateDriverConfiguredDataSourceWithXaTransactionSupport
: Creation of a DataSource with XA transaction supportcreateXADataSourceConfiguredDataSource
: Creation of an XA DataSource as DataSourcecreateConnectionPoolDataSourceAsResource
: Creation of a connection poolcreateXADataSourceAsResource
: Creation of an XA DataSource as a resourcecreateMailSessionAsResource
: Creation of a Mail resourcecreateDataSourceWithWindowsPath
: Creation of a DataSource with a Windows pathcreateJmsQueueAsResource
: Creation of a JMS resource
DataSourceOnStandaloneConfigurationTest
: datasource DataSource definition.TransactionEmulationDataSourceOnStandaloneConfigurationTest
: datasource DataSource definition with transaction emulation.XATransactionDataSourceOnStandaloneConfigurationTest
: XA datasource XA DataSource definition.MailResourceOnStandaloneConfigurationTest
: resource Resource definition, showing for examplemailsession
.JmsResourceOnStandaloneConfigurationTest
: resource Resource definition, showing for example a JMS queue.
Users of the Maven2/Maven3 plugin can use the Maven2 Archetype showing datasource showing DataSource support. Please read: Datasource DataSource Definition Archetype.