|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatConfigurationBuilder
public abstract class AbstractTomcatConfigurationBuilder
Constructs xml elements needed to configure a DataSource for Tomcat. Note that this
implementation converts DataSources into Resources and then uses an appropriate
ConfigurationBuilder
to create the configuration.
Field Summary | |
---|---|
protected Map |
typeToFactory
contains a mapping of resource types to the factory they use. |
Constructor Summary | |
---|---|
AbstractTomcatConfigurationBuilder()
generates typeToFactory |
Method Summary | |
---|---|
String |
buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
This throws an UnsupportedOperationException as Tomcat is not transactional. |
String |
buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
This throws an UnsupportedOperationException as Tomcat is not transactional. |
String |
buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
this implementation first converts the DataSource to a Resource before returning XML. |
String |
buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
This throws an UnsupportedOperationException as Tomcat is not transactional. |
protected String |
convertDataSourceToResourceAndGetXMLEntry(DataSource ds)
This method converts the DataSource to a Resource and then builds the xml entry based on that. |
protected Resource |
convertToResource(DataSource ds)
This method converts the DataSource to a Resource used in Tomcat. |
protected String |
getFactoryClassFor(String type)
|
Methods inherited from class org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder |
---|
toConfigurationEntry |
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 |
Field Detail |
---|
protected Map typeToFactory
Constructor Detail |
---|
public AbstractTomcatConfigurationBuilder()
typeToFactory
Method Detail |
---|
public String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
buildEntryForDriverConfiguredDataSourceWithNoTx
in class AbstractConfigurationBuilder
ds
- the DataSource
with the following state:
DataSource.getJndiLocation()
is set to a unique path for the
container.DataSource.getDriverClass()
is an implementation of
java.sql.Driver
DataSource.getTransactionSupport()
is
TransactionSupport.NO_TRANSACTION
javax.sql.DataSource
to the JNDI path specified at
DataSource.getJndiLocation()
.convertDataSourceToResourceAndGetXMLEntry(DataSource)
protected String convertDataSourceToResourceAndGetXMLEntry(DataSource ds)
ds
- the DataSource we are configuring.
protected Resource convertToResource(DataSource ds)
ds
- the DataSource we are configuring.
protected String getFactoryClassFor(String type)
type
- the type of object we are creating
factory
responsible for creating the objects.public String buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
buildConfigurationEntryForXADataSourceConfiguredDataSource
in class AbstractConfigurationBuilder
ds
- the DataSource
with the following state:
DataSource.getJndiLocation()
is set to a unique path for the
container.DataSource.getConnectionType()
is javax.sql.XADataSource
DataSource.getDriverClass()
is an implementation of
javax.sql.XADataSource
javax.sql.DataSource
to the JNDI path specified at
DataSource.getJndiLocation()
. This container will provide XA support through
the third party implementation specified at DataSource.getDriverClass()
.public String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
buildEntryForDriverConfiguredDataSourceWithLocalTx
in class AbstractConfigurationBuilder
ds
- the DataSource
with the following state:
DataSource.getJndiLocation()
is set to a unique path for the
container.DataSource.getDriverClass()
is an implementation of
java.sql.Driver
DataSource.getTransactionSupport()
is
TransactionSupport.LOCAL_TRANSACTION
javax.sql.DataSource
to the JNDI path specified at
DataSource.getJndiLocation()
.public String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
buildEntryForDriverConfiguredDataSourceWithXaTx
in class AbstractConfigurationBuilder
ds
- the DataSource
with the following state:
DataSource.getJndiLocation()
is set to a unique path for the
container.DataSource.getDriverClass()
is an implementation of
java.sql.Driver
DataSource.getTransactionSupport()
is
TransactionSupport.XA_TRANSACTION
javax.sql.DataSource
to the JNDI path specified at
DataSource.getJndiLocation()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |