Class TomcatGenericWebappsDeployer

java.lang.Object
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer

public class TomcatGenericWebappsDeployer extends Object
This deployer is responsible for deploying/undeploying/updating those webapps.
See Also:
  • invalid reference
    org.wso2.carbon.tomcat
  • Field Details

    • webContextPrefix

      protected String webContextPrefix
    • tenantId

      protected int tenantId
    • tenantDomain

      protected String tenantDomain
    • configurationContext

      protected org.apache.axis2.context.ConfigurationContext configurationContext
    • webApplicationsHolderMap

      protected Map<String,WebApplicationsHolder> webApplicationsHolderMap
    • sessionManagerMap

      protected Map<String,org.apache.catalina.Manager> 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 prefix
      tenantId - The tenant ID of the tenant to whom this deployer belongs to
      tenantDomain - The tenant domain of the tenant to whom this deployer belongs to
      webApplicationsHolderMap - 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 deployed
      webContextParams - context-params for this webapp
      applicationEventListeners - 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 deployed
      webContextParams - ServletContext params for this webapp
      applicationEventListeners - 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 file
      webContextParams - ServletContext params for this webapp
      applicationEventListeners - 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 directory
      webContextParams - ServletContext params for this webapp
      applicationEventListeners - 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 updated
      webContextParams - ServletContext params for this webapp
      applicationEventListeners - Application event listeners
      Throws:
      org.wso2.carbon.CarbonException - If a deployment error occurs
    • undeploy

      public void undeploy(File webappFile) throws org.wso2.carbon.CarbonException
      Handle undeployment.
      Parameters:
      webappFile - The webapp file to be undeployed
      Throws:
      org.wso2.carbon.CarbonException - If an error occurs while undeploying webapp
    • lazyUnload

      public void lazyUnload(File webappFile) throws org.wso2.carbon.CarbonException
      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.AxisFault
      org.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.AxisFault
      org.wso2.carbon.core.persistence.metadata.ArtifactMetadataException
    • handleAppVersion

      protected String handleAppVersion(String warContext)