org.codehaus.cargo.container.resin.internal
Class Resin2xConfigurationBuilder

java.lang.Object
  extended by org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
      extended by org.codehaus.cargo.container.resin.internal.Resin2xConfigurationBuilder
All Implemented Interfaces:
ConfigurationBuilder
Direct Known Subclasses:
Resin3xConfigurationBuilder

public class Resin2xConfigurationBuilder
extends AbstractConfigurationBuilder

Contains the xml elements used to build a normal or XA compliant DataSource for Resin.

Version:
$Id: $

Field Summary
static String TRANSACTIONS_WITH_XA_OR_JCA_ONLY
          Exception message when trying to configure Transactions when not using an appropriate driver.
 
Constructor Summary
Resin2xConfigurationBuilder()
           
 
Method Summary
 String buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
          
 String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
          
 String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
          
 String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
          
 String toConfigurationEntry(Resource resource)
          Detects the type of the Resource and creates an appropriate configuration.
protected  String toResinConfigurationEntry(DataSource ds)
          In Resin 2.x DataSources are Resources
 
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
 

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
Constructor Detail

Resin2xConfigurationBuilder

public Resin2xConfigurationBuilder()
Method Detail

toConfigurationEntry

public String toConfigurationEntry(Resource resource)
Detects the type of the Resource and creates an appropriate configuration.

Parameters:
resource - the Resource you wish to build a configuration entry for.
Returns:
the container-specific representation of this configuration.

toResinConfigurationEntry

protected String toResinConfigurationEntry(DataSource ds)
In Resin 2.x DataSources are Resources

Parameters:
ds - datasource to configure
Returns:
String representing the Resource representing it.

buildEntryForDriverConfiguredDataSourceWithNoTx

public String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)

Specified by:
buildEntryForDriverConfiguredDataSourceWithNoTx in class AbstractConfigurationBuilder
Parameters:
ds - the DataSource with the following state:
Returns:
configuration binding a container provided implementation of type javax.sql.DataSource to the JNDI path specified at DataSource.getJndiLocation().

buildEntryForDriverConfiguredDataSourceWithLocalTx

public String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)

Specified by:
buildEntryForDriverConfiguredDataSourceWithLocalTx in class AbstractConfigurationBuilder
Parameters:
ds - the DataSource with the following state:
Returns:
configuration binding a container provided implementation of type javax.sql.DataSource to the JNDI path specified at DataSource.getJndiLocation().

buildEntryForDriverConfiguredDataSourceWithXaTx

public String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)

Specified by:
buildEntryForDriverConfiguredDataSourceWithXaTx in class AbstractConfigurationBuilder
Parameters:
ds - the DataSource with the following state:
Returns:
configuration binding a container provided implementation of type javax.sql.DataSource to the JNDI path specified at DataSource.getJndiLocation().

buildConfigurationEntryForXADataSourceConfiguredDataSource

public String buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)

Specified by:
buildConfigurationEntryForXADataSourceConfiguredDataSource in class AbstractConfigurationBuilder
Parameters:
ds - the DataSource with the following state:
Returns:
configuration binding a container provided implementation of type 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-2012 Codehaus. All Rights Reserved.