Class ExtractingRoot

All Implemented Interfaces:
MBeanRegistration, JmxEnabled, Lifecycle, WebResourceRoot

public class ExtractingRoot extends StandardRoot
If the main resources are packaged as a WAR file then any JARs will be extracted to the work directory and used from there.
  • Constructor Details

    • ExtractingRoot

      public ExtractingRoot()
      Creates a new ExtractingRoot instance.
  • Method Details

    • processWebInfLib

      protected void processWebInfLib() throws LifecycleException
      Description copied from class: StandardRoot
      Class loader resources are handled by treating JARs in WEB-INF/lib as resource JARs (without the internal META-INF/resources/ prefix) mounted at WEB-INF/classes (rather than the web app root). This enables reuse of the resource handling plumbing. These resources are marked as class loader only so they are only used in the methods that are explicitly defined to return class loader resources. This prevents calls to getResource("/WEB-INF/classes") returning from one or more of the JAR files.
      Overrides:
      processWebInfLib in class StandardRoot
      Throws:
      LifecycleException - If an error occurs that should stop the web application from starting
    • isPackedWarFile

      protected boolean isPackedWarFile()
      Description copied from class: StandardRoot
      Returns true if and only if all the resources for this web application are provided via a packed WAR file. It is used to optimise cache validation in this case on the basis that the WAR file will not change.
      Overrides:
      isPackedWarFile in class StandardRoot
      Returns:
      true if the application is served from a packed WAR file
    • stopInternal

      protected void stopInternal() throws LifecycleException
      Description copied from class: LifecycleBase
      Subclasses must ensure that the state is changed to LifecycleState.STOPPING during the execution of this method. Changing state will trigger the Lifecycle.STOP_EVENT event.
      Overrides:
      stopInternal in class StandardRoot
      Throws:
      LifecycleException - Stop error occurred