Class Tomcat4xStandaloneLocalConfiguration
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
-
- org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
-
- org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
-
- org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
-
- org.codehaus.cargo.container.tomcat.internal.AbstractCatalinaStandaloneLocalConfiguration
-
- org.codehaus.cargo.container.tomcat.Tomcat4xStandaloneLocalConfiguration
-
- All Implemented Interfaces:
Configuration
,DataSourceSupport
,ResourceSupport
,LocalConfiguration
,StandaloneLocalConfiguration
,ContainerConfiguration
,Loggable
public class Tomcat4xStandaloneLocalConfiguration extends AbstractCatalinaStandaloneLocalConfiguration
StandAloneLocalConfiguration that is appropriate for Tomcat 4.x containers.
-
-
Field Summary
-
Fields inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
RESOURCE_PATH
-
-
Constructor Summary
Constructors Constructor Description Tomcat4xStandaloneLocalConfiguration(String dir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigurationBuilder
createConfigurationBuilder(LocalContainer container)
protected void
doConfigure(LocalContainer container)
Tomcat 4.x does not load$CATALINA_BASE/common/lib
(as explained in http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html), therefore we copy the extra classpath into$CATALINA_HOME/common/lib
.ConfigurationCapability
getCapability()
protected String
getOrCreateResourceConfigurationFile(Resource rs, LocalContainer container)
note that this file could hold other configuration besides Resources.protected String
getXpathForResourcesParent()
Resource entries must be stored in the xml configuration file.protected void
setupConfFiles(String confDir)
setup the files in the configuration'sconf
directory.protected void
setupManager(LocalContainer container)
Setup the manager webapp.String
toString()
-
Methods inherited from class org.codehaus.cargo.container.tomcat.internal.AbstractCatalinaStandaloneLocalConfiguration
connectorXpath, createContextToken, createDeployer, createTomcatWebappsToken, escapePath, getNamespaces, getOrCreateDataSourceConfigurationFile, getSecurityToken, getTomcatLoggingLevel, getXpathForDataSourcesParent, setProperty, setupWebApps
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
configure, configure, configure, configureDataSources, configureResources, writeConfigurationToXpath
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration
addXmlReplacement, addXmlReplacement, addXmlReplacement, addXmlReplacement, configureFiles, getType, getXmlReplacements, performXmlReplacements, removeXmlReplacement, removeXmlReplacement, replaceInFile, setupConfigurationDir, verify
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractLocalConfiguration
addDataSource, addDataSourcesFromProperties, addDeployable, addResource, addResourcesFromProperties, addUser, addUsersFromProperties, applyPortOffset, applyPortOffset, collectUnsupportedDataSourcesAndThrowException, collectUnsupportedResourcesAndThrowException, flagOffsetApplied, getDataSources, getDeployables, getDestDirectoryLocation, getDestFileLocation, getFileHandler, getFileProperties, getHome, getPropertyValue, getReplacements, getResources, getResourceUtils, getUsers, isOffsetApplied, isOffsetApplied, parsePropertiesForPendingConfiguration, revertPortOffset, revertPortOffset, setConfigFileProperty, setFileHandler, setFileProperty, setLogger
-
Methods inherited from class org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
getProperties
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration
getProperties, getPropertyValue
-
Methods inherited from interface org.codehaus.cargo.container.configuration.LocalConfiguration
addDataSource, addDeployable, addResource, addUser, applyPortOffset, getDataSources, getDeployables, getFileHandler, getFileProperties, getHome, getResources, getUsers, isOffsetApplied, revertPortOffset, setConfigFileProperty, setFileHandler, setFileProperty
-
-
-
-
Constructor Detail
-
Tomcat4xStandaloneLocalConfiguration
public Tomcat4xStandaloneLocalConfiguration(String dir)
-
-
Method Detail
-
getCapability
public ConfigurationCapability getCapability()
- Returns:
- the
ConfigurationCapability
of the configuration in term of properties it supports, etc
-
createConfigurationBuilder
protected ConfigurationBuilder createConfigurationBuilder(LocalContainer container)
- Specified by:
createConfigurationBuilder
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Parameters:
container
- Container the dataSource will be configured on.- Returns:
- the object that produces xml entries for DataSource definitions.
-
setupManager
protected void setupManager(LocalContainer container)
Setup the manager webapp.- Specified by:
setupManager
in classAbstractCatalinaStandaloneLocalConfiguration
- Parameters:
container
- the container to configure
-
getXpathForResourcesParent
protected String getXpathForResourcesParent()
Resource entries must be stored in the xml configuration file. Under which element do we insert the entries? example: //Engine/DefaultContext- Specified by:
getXpathForResourcesParent
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Returns:
- path the the parent element Resources should be inserted under.
-
toString
public String toString()
- Overrides:
toString
in classAbstractCatalinaStandaloneLocalConfiguration
-
getOrCreateResourceConfigurationFile
protected String getOrCreateResourceConfigurationFile(Resource rs, LocalContainer container)
note that this file could hold other configuration besides Resources.- Specified by:
getOrCreateResourceConfigurationFile
in classAbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder
- Parameters:
rs
- the Resource configuration you wish to install on the container.container
- the container whose configuration you wish to affect.- Returns:
- the file that holds Resource configuration.
-
doConfigure
protected void doConfigure(LocalContainer container) throws Exception
Tomcat 4.x does not load$CATALINA_BASE/common/lib
(as explained in http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html), therefore we copy the extra classpath into$CATALINA_HOME/common/lib
. Implementation ofLocalConfiguration.configure(LocalContainer)
that all local configuration using this class must implement. This provides the ability to perform generic actions before and after the container-specific implementation. Another way would be to use AOP...- Overrides:
doConfigure
in classAbstractCatalinaStandaloneLocalConfiguration
- Parameters:
container
- the container to configure- Throws:
Exception
- if any error is raised during the configuration
-
setupConfFiles
protected void setupConfFiles(String confDir)
setup the files in the configuration'sconf
directory.- Specified by:
setupConfFiles
in classAbstractCatalinaStandaloneLocalConfiguration
- Parameters:
confDir
- - theconf
directory.
-
-