org.codehaus.cargo.container.weblogic.internal
Class WebLogic8xConfigurationBuilder

java.lang.Object
  extended by org.codehaus.cargo.container.spi.configuration.builder.AbstractConfigurationBuilder
      extended by org.codehaus.cargo.container.weblogic.internal.WebLogic8xConfigurationBuilder
All Implemented Interfaces:
ConfigurationBuilder
Direct Known Subclasses:
WebLogic9x10xAnd103xConfigurationBuilder

public class WebLogic8xConfigurationBuilder
extends AbstractConfigurationBuilder

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

Version:
$Id: $

Field Summary
static String RESOURCE_CONFIGURATION_UNSUPPORTED
          Exception message when trying to configure a Resource.
 
Constructor Summary
WebLogic8xConfigurationBuilder(String serverName)
          Create an instance to add configuration for a particular server.
 
Method Summary
 String buildConfigurationEntryForXADataSourceConfiguredDataSource(DataSource ds)
          
 String buildEntryForDriverConfiguredDataSourceWithLocalTx(DataSource ds)
          
 String buildEntryForDriverConfiguredDataSourceWithNoTx(DataSource ds)
          
 String buildEntryForDriverConfiguredDataSourceWithXaTx(DataSource ds)
          
protected  String configureDataSourceWithImplementationClass(DataSource ds, String className)
           
protected  String getServerName()
           
protected  void setServerName(String serverName)
           
 String toConfigurationEntry(Resource resource)
          Detects the type of the Resource and creates an appropriate configuration.
 
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

RESOURCE_CONFIGURATION_UNSUPPORTED

public static final String RESOURCE_CONFIGURATION_UNSUPPORTED
Exception message when trying to configure a Resource.

See Also:
Constant Field Values
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:
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().

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().

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().

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 the Resource and 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.


Copyright © 2004-2012 Codehaus. All Rights Reserved.