public abstract class AbstractConfigurationBuilder extends Object implements ConfigurationBuilder
Constructor and Description |
---|
AbstractConfigurationBuilder() |
Modifier and Type | Method and 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 the
DataSource and creates an appropriate configuration. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toConfigurationEntry
public final String toConfigurationEntry(DataSource ds)
DataSource
and creates an appropriate configuration. Detects the type of DataSource
to configure based on transactional
properties and implementation class.toConfigurationEntry
in interface ConfigurationBuilder
ds
- the DataSource you wish to build a configuration entry for.public abstract String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
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()
.public abstract String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
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 abstract String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
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()
.public abstract String buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
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()
.Copyright © 2004-2013 Codehaus. All Rights Reserved.