org.apache.catalina.core
public class JreMemoryLeakPreventionListener extends Object implements LifecycleListener
Memory leaks occur when JRE code uses the context class loader to load a singleton as this will cause a memory leak if a web application class loader happens to be the context class loader at the time. The work-around is to initialise these singletons when Tomcat's common class loader is the context class loader.
Locked files usually occur when a resource inside a JAR is accessed without first disabling Jar URL connection caching. The workaround is to disable this caching by default.
Method Summary | |
---|---|
boolean | isAppContextProtection() |
boolean | isGcDaemonProtection() |
boolean | isUrlCacheProtection() |
boolean | isXmlParsingProtection() |
void | lifecycleEvent(LifecycleEvent event) |
void | setAppContextProtection(boolean appContextProtection) |
void | setGcDaemonProtection(boolean gcDaemonProtection) |
void | setUrlCacheProtection(boolean urlCacheProtection) |
void | setXmlParsingProtection(boolean xmlParsingProtection) |