Package org.eclnt.jsfserver.managedbean
Class HotDeployManager
java.lang.Object
org.eclnt.jsfserver.managedbean.HotDeployManager
Returns back a class loader that is configured by /eclntjsfserver/hotdeploy.xml.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static boolean
static boolean
static ClassLoader
Current class loader - either the normal web app classloader, or - in case of hot deployment - the hot deploy class loader that is currently active.static void
initialize
(javax.servlet.ServletContext servletContext) static boolean
Check if hot deployment is activiated - or not.static void
static void
removeClassPathDirectory
(String directory) static void
By default the parent class loader is the class loade that loaded the HotDeployManager.static String
testReplaceLatestInFileName
(String fileName) static void
Creates a new instance of the classloader that is internally used to load the hot deployment classes.static boolean
Checks if trigger file "/eclnthotdeploy/.cctrigger" was changed.
-
Method Details
-
initialize
public static void initialize(javax.servlet.ServletContext servletContext) -
setCurrentParentClassLoader
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
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
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
-
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
-
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
-