Class WebLogic8xConfigurationBuilder
- java.lang.Object
-
- org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
-
- org.codehaus.cargo.container.weblogic.internal.WebLogic8xConfigurationBuilder
-
- All Implemented Interfaces:
ConfigurationBuilder
- Direct Known Subclasses:
WebLogic9x10x103x12xConfigurationBuilder
public class WebLogic8xConfigurationBuilder extends AbstractConfigurationBuilder
Contains the xml elements used to build a normal or XA compliant DataSource for WebLogic.
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentBuilderbuilderXML DOM document builder.static StringRESOURCE_CONFIGURATION_UNSUPPORTEDException message when trying to configure a Resource.
-
Constructor Summary
Constructors Constructor Description WebLogic8xConfigurationBuilder(String serverName)Create an instance to add configuration for a particular server.
-
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)protected StringconfigureDataSourceWithImplementationClass(DataSource ds, String className)protected StringgetServerName()protected voidsetServerName(String serverName)StringtoConfigurationEntry(Resource resource)Detects the type of theResourceand creates an appropriate configuration.-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
toConfigurationEntry
-
-
-
-
Field Detail
-
RESOURCE_CONFIGURATION_UNSUPPORTED
public static final String RESOURCE_CONFIGURATION_UNSUPPORTED
Exception message when trying to configure a Resource.- See Also:
- Constant Field Values
-
builder
protected DocumentBuilder builder
XML DOM document builder.
-
-
Constructor Detail
-
WebLogic8xConfigurationBuilder
public WebLogic8xConfigurationBuilder(String serverName)
Create an instance to add configuration for a particular server.- Parameters:
serverName- server to target resources to.
-
-
Method Detail
-
configureDataSourceWithImplementationClass
protected String configureDataSourceWithImplementationClass(DataSource ds, String className)
- Parameters:
ds- the DataSource we are configuring.className- the implementation class used for this DataSource- Returns:
- a datasource xml fragment that can be embedded directly into the config.xml file
-
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().
-
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().
-
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().
-
setServerName
protected void setServerName(String serverName)
- Parameters:
serverName- the serverName to set
-
getServerName
protected String getServerName()
- Returns:
- the serverName
-
toConfigurationEntry
public String toConfigurationEntry(Resource resource)
Detects the type of theResourceand creates an appropriate configuration. This implementation throws an UnsupportedOperationException as Resource configuration is not supported in Orion.- Parameters:
resource- the Resource you wish to build a configuration entry for.- Returns:
- the container-specific representation of this configuration.
-
-