Class EmbeddedHostConfig
- java.lang.Object
-
- org.apache.catalina.startup.HostConfig
-
- org.jboss.arquillian.container.tomcat.embedded.EmbeddedHostConfig
-
- All Implemented Interfaces:
org.apache.catalina.LifecycleListener
public class EmbeddedHostConfig extends org.apache.catalina.startup.HostConfigA customHostConfigfor use in the Embedded Tomcat container integration for Arquillian.This configuration makes the protected Tomcat WAR deployment implementation (as is used by the typical standalone server) available for embedded use. We do this to retain standard deployment features that are notably absent from the current
Tomcatdeployment logic, for instance:- Deployment of an archive named "ROOT.war" to the default context "/".
- Proper processing of "META-INF/context.xml" if present in the WAR.
You'll very likely want to set the
ContextConfigclass for the associated host to anEmbeddedContextConfigviahost.setConfigClass(EmbeddedContextConfig.class.getCanonicalName()). (Note thatHostConfig#getConfigClass()is not currently used.) This will result in the application of context configuration normally sourced from "$CATALINA_BASE/conf/web.xml". This is typically done byTomcatvia aTomcat.DefaultWebXmlListeneradded to the context, butHostConfiglacks a suitable hook to add such a listener prior to the start life cycle.- Author:
- Ian Brandt
-
-
Constructor Summary
Constructors Constructor Description EmbeddedHostConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeployWAR(String warFileName)Deploy a WAR with the given file name to be found in the configured app base.voidundeployWAR(String warFileName)Undeploy a WAR with the given file name.-
Methods inherited from class org.apache.catalina.startup.HostConfig
addGlobalRedeployResources, addWatchedResources, beforeStart, check, check, checkResources, checkUndeploy, createDigester, deployApps, deployApps, deployDescriptor, deployDescriptors, deployDirectories, deployDirectory, deploymentExists, deployWAR, deployWARs, filterAppPaths, getConfigBaseName, getContextClass, getDeploymentTime, isCopyXML, isDeployed, isDeployXML, isUnpackWARs, lifecycleEvent, manageApp, migrateLegacyApp, migrateLegacyApps, removeServiced, returnCanonicalPath, setContextClass, setCopyXML, setDeployXML, setUnpackWARs, start, stop, tryAddServiced, unmanageApp
-
-
-
-
Method Detail
-
deployWAR
public void deployWAR(String warFileName)
Deploy a WAR with the given file name to be found in the configured app base.- Parameters:
warFileName- the WAR file name, e.g. "ROOT.war".
-
undeployWAR
public void undeployWAR(String warFileName)
Undeploy a WAR with the given file name.- Parameters:
warFileName- the WAR file name, e.g. "ROOT.war".
-
-