Class AbstractConfigurationBuilder
- java.lang.Object
-
- org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
-
- All Implemented Interfaces:
ConfigurationBuilder
- Direct Known Subclasses:
AbstractTomcatConfigurationBuilder
,JRun4xConfigurationBuilder
,OrionConfigurationBuilder
,Resin3xConfigurationBuilder
,WebLogic8xConfigurationBuilder
public abstract class AbstractConfigurationBuilder extends Object implements ConfigurationBuilder
-
-
Constructor Summary
Constructors Constructor Description AbstractConfigurationBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
abstract String
buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
abstract String
buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
abstract String
buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
String
toConfigurationEntry(DataSource ds)
Detects the type of theDataSource
and creates an appropriate configuration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.cargo.container.configuration.builder.ConfigurationBuilder
toConfigurationEntry
-
-
-
-
Method Detail
-
toConfigurationEntry
public String toConfigurationEntry(DataSource ds)
Detects the type of theDataSource
and creates an appropriate configuration. Detects the type ofDataSource
to configure based on transactional properties and implementation class.- Specified by:
toConfigurationEntry
in interfaceConfigurationBuilder
- Parameters:
ds
- the DataSource you wish to build a configuration entry for.- Returns:
- the container-specific representation of this configuration.
-
buildEntryForDriverConfiguredDataSourceWithXaTx
public abstract String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
- Parameters:
ds
- theDataSource
with the following state:DataSource.getJndiLocation()
is set to a unique path for the container.DataSource.getDriverClass()
is an implementation ofjava.sql.Driver
DataSource.getTransactionSupport()
isTransactionSupport.XA_TRANSACTION
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSource
to the JNDI path specified atDataSource.getJndiLocation()
.
-
buildEntryForDriverConfiguredDataSourceWithLocalTx
public abstract String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
- Parameters:
ds
- theDataSource
with the following state:DataSource.getJndiLocation()
is set to a unique path for the container.DataSource.getDriverClass()
is an implementation ofjava.sql.Driver
DataSource.getTransactionSupport()
isTransactionSupport.LOCAL_TRANSACTION
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSource
to the JNDI path specified atDataSource.getJndiLocation()
.
-
buildEntryForDriverConfiguredDataSourceWithNoTx
public abstract String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
- Parameters:
ds
- theDataSource
with the following state:DataSource.getJndiLocation()
is set to a unique path for the container.DataSource.getDriverClass()
is an implementation ofjava.sql.Driver
DataSource.getTransactionSupport()
isTransactionSupport.NO_TRANSACTION
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSource
to the JNDI path specified atDataSource.getJndiLocation()
.
-
buildConfigurationEntryForXADataSourceConfiguredDataSource
public abstract String buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
- Parameters:
ds
- theDataSource
with the following state:DataSource.getJndiLocation()
is set to a unique path for the container.DataSource.getConnectionType()
isjavax.sql.XADataSource
DataSource.getDriverClass()
is an implementation ofjavax.sql.XADataSource
- Returns:
- configuration binding a container provided implementation of type
javax.sql.DataSource
to the JNDI path specified atDataSource.getJndiLocation()
. This container will provide XA support through the third party implementation specified atDataSource.getDriverClass()
.
-
-