Package org.wso2.carbon.webapp.mgt
Class TomcatGenericWebappsDeployer
java.lang.Object
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer
This deployer is responsible for deploying/undeploying/updating those webapps.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.axis2.context.ConfigurationContextprotected Stringprotected intprotected Map<String, WebApplicationsHolder> protected String -
Constructor Summary
ConstructorsConstructorDescriptionTomcatGenericWebappsDeployer(String webContextPrefix, int tenantId, String tenantDomain, Map<String, WebApplicationsHolder> webApplicationsHolderMap, org.apache.axis2.context.ConfigurationContext configurationContext) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoiddeploy(File webappFile, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) Deploy webappsprotected StringhandleAppVersion(String warContext) protected voidhandleExplodedWebappDeployment(File webappDir, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) Handle the deployment of a an exploded webapp.protected voidhandleHotDeployment(File webapp, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) Hot deploy a webapp.protected voidhandleHotUpdate(WebApplication webApplication, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) Hot update an existing webapp.protected voidhandleWarWebappDeployment(File webappWAR, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) Handle the deployment of a an archive webapp.protected voidhandleWebappDeployment(File webappFile, String contextStr, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) protected voidhandleZipWebappDeployment(File webapp, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) voidlazyUnload(File webappFile) Handle undeployment.protected StringrecievePersistedWebappMetaData(File webappFile, String propertyName) This method reads from webapp meta files to check weather bam statistics are enabled.protected voidsetPersistedWebappMetaData(File webappFile, String propertyName, String value) This method stores the value in the webapp metadata file.voidHandle undeployment.
-
Field Details
-
webContextPrefix
-
tenantId
protected int tenantId -
tenantDomain
-
configurationContext
protected org.apache.axis2.context.ConfigurationContext configurationContext -
webApplicationsHolderMap
-
sessionManagerMap
-
-
Constructor Details
-
TomcatGenericWebappsDeployer
public TomcatGenericWebappsDeployer(String webContextPrefix, int tenantId, String tenantDomain, Map<String, WebApplicationsHolder> webApplicationsHolderMap, org.apache.axis2.context.ConfigurationContext configurationContext) Constructor- Parameters:
webContextPrefix- The Web context prefixtenantId- The tenant ID of the tenant to whom this deployer belongs totenantDomain- The tenant domain of the tenant to whom this deployer belongs towebApplicationsHolderMap- WebApplicationsHolder
-
-
Method Details
-
deploy
public void deploy(File webappFile, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) throws org.wso2.carbon.CarbonException Deploy webapps- Parameters:
webappFile- The webapp file to be deployedwebContextParams- context-params for this webappapplicationEventListeners- Application event listeners- Throws:
org.wso2.carbon.CarbonException- If a deployment error occurs
-
handleHotDeployment
protected void handleHotDeployment(File webapp, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) throws org.wso2.carbon.CarbonException Hot deploy a webapp. i.e., deploy a webapp that has newly become available.- Parameters:
webapp- The webapp WAR or directory that needs to be deployedwebContextParams- ServletContext params for this webappapplicationEventListeners- Application event listeners- Throws:
org.wso2.carbon.CarbonException- If an error occurs during deployment
-
handleWarWebappDeployment
protected void handleWarWebappDeployment(File webappWAR, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) throws org.wso2.carbon.CarbonException Handle the deployment of a an archive webapp. i.e., a WAR- Parameters:
webappWAR- The WAR webapp filewebContextParams- ServletContext params for this webappapplicationEventListeners- Application event listeners- Throws:
org.wso2.carbon.CarbonException- If a deployment error occurs
-
handleZipWebappDeployment
protected void handleZipWebappDeployment(File webapp, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
handleExplodedWebappDeployment
protected void handleExplodedWebappDeployment(File webappDir, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) throws org.wso2.carbon.CarbonException Handle the deployment of a an exploded webapp. i.e., a webapp deployed as a directory invalid input: '&' not an archive- Parameters:
webappDir- The exploded webapp directorywebContextParams- ServletContext params for this webappapplicationEventListeners- Application event listeners- Throws:
org.wso2.carbon.CarbonException- If a deployment error occurs
-
handleWebappDeployment
protected void handleWebappDeployment(File webappFile, String contextStr, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) throws org.wso2.carbon.CarbonException - Throws:
org.wso2.carbon.CarbonException
-
handleHotUpdate
protected void handleHotUpdate(WebApplication webApplication, List<WebContextParameter> webContextParams, List<Object> applicationEventListeners) throws org.wso2.carbon.CarbonException Hot update an existing webapp. i.e., reload or redeploy a webapp archive which has been updated- Parameters:
webApplication- The webapp which needs to be hot updatedwebContextParams- ServletContext params for this webappapplicationEventListeners- Application event listeners- Throws:
org.wso2.carbon.CarbonException- If a deployment error occurs
-
undeploy
Handle undeployment.- Parameters:
webappFile- The webapp file to be undeployed- Throws:
org.wso2.carbon.CarbonException- If an error occurs while undeploying webapp
-
lazyUnload
Handle undeployment.- Parameters:
webappFile- The webapp file to be undeployed- Throws:
org.wso2.carbon.CarbonException- If an error occurs while lazy unloading
-
recievePersistedWebappMetaData
protected String recievePersistedWebappMetaData(File webappFile, String propertyName) throws org.apache.axis2.AxisFault, org.wso2.carbon.core.persistence.metadata.ArtifactMetadataException This method reads from webapp meta files to check weather bam statistics are enabled.- Parameters:
webappFile-propertyName-- Returns:
- bam enable or disable
- Throws:
org.apache.axis2.AxisFaultorg.wso2.carbon.core.persistence.metadata.ArtifactMetadataException
-
setPersistedWebappMetaData
protected void setPersistedWebappMetaData(File webappFile, String propertyName, String value) throws org.apache.axis2.AxisFault, org.wso2.carbon.core.persistence.metadata.ArtifactMetadataException This method stores the value in the webapp metadata file.- Parameters:
webappFile-propertyName-value-- Throws:
org.apache.axis2.AxisFaultorg.wso2.carbon.core.persistence.metadata.ArtifactMetadataException
-
handleAppVersion
-