This page last changed on Mar 11, 2009 by adriancole.

Here are the configurations that currently support DataSource or Resource configuration:

Container Configuration Resource DataSource Transactional DataSource XA DataSource
Tomcat 4.x o.c.c.c.tomcat.Tomcat4xStandaloneLocalConfiguration
Tomcat 5.x o.c.c.c.tomcat.Tomcat5xStandaloneLocalConfiguration
Tomcat 6.x o.c.c.c.tomcat.Tomcat6xStandaloneLocalConfiguration
WebLogic 8.x o.c.c.c.weblogic.WebLogicStandaloneLocalConfiguration
WebLogic 9.x o.c.c.c.weblogic.WebLogic9xStandaloneLocalConfiguration
WebLogic 10.x o.c.c.c.weblogic.WebLogic10xStandaloneLocalConfiguration
WebLogic 10.3x o.c.c.c.weblogic.WebLogic10xStandaloneLocalConfiguration
Oc4J 9.x o.c.c.c.orion.Oc4j9xStandaloneLocalConfiguration
Resin 2.x o.c.c.c.resin.Resin2xStandaloneLocalConfiguration
Resin 3.x o.c.c.c.resin.Resin3xStandaloneLocalConfiguration

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
c.d.jndi the path to this in jndi any jndi path, like jdbc/userds mandatory mandatory mandatory
c.d.driver the implementation class ex. my.Driver mandatory: must implement java.sql.Driver mandatory: must implement java.sql.Driver mandatory: must implement javax.sql.XADataSource
c.d.properties properties to pass to the driver semi-colon delimited string optional optional mandatory
c.d.url url for the java.sql.Driver ex. jdbc:host:port/mydb mandatory mandatory optional
c.d.type 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
c.d.transactionsupport what transaction support LOCAL_TRANSACTION or XA_TRANSACTION do not set mandatory unset defaults to only valid option: XA_TRANSACTION
c.d.id used in configuration files to reference this datasource must contain no path-like characters optional optional optional
c.d.username username to connect to the db string optional optional optional
c.d.password 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?
c.r.name the path to this in jndi any jndi path, like resource/apple mandatory
c.r.type Interface of the object valid interface mandatory
c.r.class the implementation class valid class implementing the interface mandatory
c.r.parameters properties to to populate the class with semi-colon delimited string; must correspond to setters optional
Document generated by Confluence on Nov 20, 2010 19:43