Class Resin3xConfigurationBuilder
- java.lang.Object
-
- org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
-
- org.codehaus.cargo.container.resin.internal.Resin3xConfigurationBuilder
-
- All Implemented Interfaces:
ConfigurationBuilder
public class Resin3xConfigurationBuilder extends AbstractConfigurationBuilder
Constructs xml elements needed to configure a normal or XA compliant DataSource for Resin 3.x.
-
-
Field Summary
Fields Modifier and Type Field Description static StringTRANSACTIONS_WITH_XA_OR_JCA_ONLYException message when trying to configure Transactions when not using an appropriate driver.
-
Constructor Summary
Constructors Constructor Description Resin3xConfigurationBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)StringbuildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)StringbuildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)StringbuildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)StringtoConfigurationEntry(Resource resource)Detects the type of theResourceand creates an appropriate configuration.protected StringtoResinConfigurationEntry(DataSource ds)In Resin 3.x DataSources are proper types-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
toConfigurationEntry
-
-
-
-
Field Detail
-
TRANSACTIONS_WITH_XA_OR_JCA_ONLY
public static final String TRANSACTIONS_WITH_XA_OR_JCA_ONLY
Exception message when trying to configure Transactions when not using an appropriate driver.- See Also:
- Constant Field Values
-
-
Method Detail
-
toResinConfigurationEntry
protected String toResinConfigurationEntry(DataSource ds)
In Resin 3.x DataSources are proper types- Parameters:
ds- datasource to configure- Returns:
- String representing the <datasource/> entry.
-
toConfigurationEntry
public String toConfigurationEntry(Resource resource)
Detects the type of theResourceand creates an appropriate configuration.- Parameters:
resource- the Resource you wish to build a configuration entry for.- Returns:
- the container-specific representation of this configuration.
-
buildEntryForDriverConfiguredDataSourceWithNoTx
public String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
- Specified by:
buildEntryForDriverConfiguredDataSourceWithNoTxin classAbstractConfigurationBuilder- Parameters:
ds- theDataSourcewith the following state:DataSource.getJndiLocation()is set to a unique path for the container.DataSource.getDriverClass()is an implementation ofjava.sql.DriverDataSource.getTransactionSupport()isTransactionSupport.NO_TRANSACTION
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSourceto the JNDI path specified atDataSource.getJndiLocation().
-
buildEntryForDriverConfiguredDataSourceWithLocalTx
public String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
- Specified by:
buildEntryForDriverConfiguredDataSourceWithLocalTxin classAbstractConfigurationBuilder- Parameters:
ds- theDataSourcewith the following state:DataSource.getJndiLocation()is set to a unique path for the container.DataSource.getDriverClass()is an implementation ofjava.sql.DriverDataSource.getTransactionSupport()isTransactionSupport.LOCAL_TRANSACTION
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSourceto the JNDI path specified atDataSource.getJndiLocation().
-
buildEntryForDriverConfiguredDataSourceWithXaTx
public String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
- Specified by:
buildEntryForDriverConfiguredDataSourceWithXaTxin classAbstractConfigurationBuilder- Parameters:
ds- theDataSourcewith the following state:DataSource.getJndiLocation()is set to a unique path for the container.DataSource.getDriverClass()is an implementation ofjava.sql.DriverDataSource.getTransactionSupport()isTransactionSupport.XA_TRANSACTION
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSourceto the JNDI path specified atDataSource.getJndiLocation().
-
buildConfigurationEntryForXADataSourceConfiguredDataSource
public String buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
- Specified by:
buildConfigurationEntryForXADataSourceConfiguredDataSourcein classAbstractConfigurationBuilder- Parameters:
ds- theDataSourcewith the following state:DataSource.getJndiLocation()is set to a unique path for the container.DataSource.getConnectionType()isjavax.sql.XADataSourceDataSource.getDriverClass()is an implementation ofjavax.sql.XADataSource
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSourceto the JNDI path specified atDataSource.getJndiLocation(). This container will provide XA support through the third party implementation specified atDataSource.getDriverClass().
-
-