Here are the configurations that currently support DataSource or Resource configuration:
Container |
Configuration |
Resource |
DataSource |
Transactional DataSource |
XA DataSource |
|---|---|---|---|---|---|
Tomcat 4.x |
|
|
|
|
|
Tomcat 5.x |
|
|
|
|
|
Tomcat 6.x |
|
|
|
|
|
Tomcat 7.x |
|
|
|
|
|
WebLogic 8.x |
|
|
|
|
|
WebLogic 9.x |
|
|
|
|
|
WebLogic 10.x |
|
|
|
|
|
WebLogic 10.3x |
|
|
|
|
|
Oc4J 9.x |
|
|
|
|
|
Resin 2.x |
|
|
|
|
|
Resin 3.x |
|
|
|
|
|
DataSource properties:
DataSources are added through pipe-delimited configuration properties that starts with cargo.datasource.datasource.
ex.
cargo.datasource.datasource1=cargo.datasource.url=jdbc:mydriver:userdb|cargo.datasource.driver=org.database.Driver|...
cargo.datasource.datasource2=cargo.datasource.url=jdbc:mydriver:referencedb|cargo.datasource.driver=org.database.Driver|...
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 in jndi |
any jndi path, like jdbc/userds |
mandatory |
mandatory |
mandatory |
|
the implementation class |
ex. my.Driver |
mandatory: must implement java.sql.Driver |
mandatory: must implement java.sql.Driver |
mandatory: must implement javax.sql.XADataSource |
|
properties to pass to the driver |
semi-colon delimited string |
optional |
optional |
mandatory |
|
url for the java.sql.Driver |
ex. jdbc:host:port/mydb |
mandatory |
mandatory |
optional |
|
Determines the type of the driver |
defaults to java.sql.Driver, only set if you want to use a javax.sql.XADataSource |
do not set |
do not set |
javax.sql.XADataSource |
|
what transaction support |
LOCAL_TRANSACTION or XA_TRANSACTION |
do not set |
mandatory |
unset defaults to only valid option: XA_TRANSACTION |
|
used in configuration files to reference this datasource |
must contain no path-like characters |
optional |
optional |
optional |
|
username to connect to the db |
string |
optional |
optional |
optional |
|
password for the username |
string |
optional |
optional |
optional |
Resource properties:
Resources are added through pipe-delimited configuration properties that starts with cargo.resource.resource.
ex.
cargo.resource.resource1=cargo.resource.name=resource/apple|cargo.resource.class=org.mycompany.Apple|...
cargo.resource.resource2=cargo.resource.name=resource/pear|cargo.resource.driver=org.mycompany.Pear|...
Here are the properties that are valid for this:
- Note that c.r means cargo.resource
Property |
Purpose |
Valid Values |
Mandatory? |
|---|---|---|---|
|
the path to this in jndi |
any jndi path, like resource/apple |
mandatory |
|
Interface of the object |
valid interface |
mandatory |
|
the implementation class |
valid class implementing the interface |
mandatory |
|
properties to to populate the class with |
semi-colon delimited string; must correspond to setters |
optional |