Class HotDeployManager

java.lang.Object
org.eclnt.jsfserver.managedbean.HotDeployManager

public class HotDeployManager extends Object
Returns back a class loader that is configured by /eclntjsfserver/hotdeploy.xml.
  • Method Details

    • initialize

      public static void initialize(javax.servlet.ServletContext servletContext)
    • setCurrentParentClassLoader

      public static void setCurrentParentClassLoader(ClassLoader value)
      By default the parent class loader is the class loade that loaded the HotDeployManager. But this can be overridden. Example: in Spring boot the parent class loader to manage the .class files is not the one that loaded HotDeployManager.
    • triggerCreationOfNewInstance

      public static void triggerCreationOfNewInstance()
      Creates a new instance of the classloader that is internally used to load the hot deployment classes. This method is called when doing a hot deployment within the tool environment of CaptainCasa. - Calling this class means, that you should be quite aware of class loading concepts + the concept behind hot deployment.
    • currentClassLoader

      public static ClassLoader currentClassLoader()
      Current class loader - either the normal web app classloader, or - in case of hot deployment - the hot deploy class loader that is currently active.
    • addClassPathDirectory

      public static void addClassPathDirectory(String directory)
      You may add directories via API which are always added to the classpath of the classloader, that is created when using hot deployment. Pay attention: the directory are only used when hot deployment is active!

      The directory is either an absolute directory (e.g. "c:\xyz\abc") or one which is relative to the working directory, for which the java.exe was started.
    • removeClassPathDirectory

      public static void removeClassPathDirectory(String directory)
    • removeAllClassPathDirectories

      public static void removeAllClassPathDirectories()
    • isHotDeploymentIsActive

      public static boolean isHotDeploymentIsActive()
      Check if hot deployment is activiated - or not.
    • checkIfProjectHotDeployClassesInTimestampedDirectory

      public static boolean checkIfProjectHotDeployClassesInTimestampedDirectory()
    • checkIfProjectHotDeployLibsInTimestampedDirectory

      public static boolean checkIfProjectHotDeployLibsInTimestampedDirectory()
    • findAllWebAppDirs

      public static List<String> findAllWebAppDirs()
    • triggerHotDeployDueToFileTrigger

      public static boolean triggerHotDeployDueToFileTrigger()
      Checks if trigger file "/eclnthotdeploy/.cctrigger" was changed. If changed then a marker is set so that the next request to the HotDeploymentManager will cause the generation of a new classloader.
      Returns:
      "true" if there a trigger was found, "false" otherwise
    • testReplaceLatestInFileName

      public static String testReplaceLatestInFileName(String fileName)