Package org.apache.catalina.core
Class JreMemoryLeakPreventionListener
- java.lang.Object
- 
- org.apache.catalina.core.JreMemoryLeakPreventionListener
 
- 
- All Implemented Interfaces:
- LifecycleListener
 
 public class JreMemoryLeakPreventionListener extends java.lang.Object implements LifecycleListener Provide a workaround for known places where the Java Runtime environment can cause a memory leak or lock files.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. This listener must only be nested within Serverelements.
- 
- 
Constructor SummaryConstructors Constructor Description JreMemoryLeakPreventionListener()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetClassesToInitialize()booleangetForkJoinCommonPoolProtection()booleangetInitSeedGenerator()booleanisAppContextProtection()booleanisAWTThreadProtection()booleanisDriverManagerProtection()booleanisGcDaemonProtection()booleanisLdapPoolProtection()booleanisTokenPollerProtection()booleanisUrlCacheProtection()booleanisXmlParsingProtection()voidlifecycleEvent(LifecycleEvent event)Acknowledge the occurrence of the specified event.voidsetAppContextProtection(boolean appContextProtection)voidsetAWTThreadProtection(boolean awtThreadProtection)voidsetClassesToInitialize(java.lang.String classesToInitialize)voidsetDriverManagerProtection(boolean driverManagerProtection)voidsetForkJoinCommonPoolProtection(boolean forkJoinCommonPoolProtection)voidsetGcDaemonProtection(boolean gcDaemonProtection)voidsetInitSeedGenerator(boolean initSeedGenerator)voidsetLdapPoolProtection(boolean ldapPoolProtection)voidsetTokenPollerProtection(boolean tokenPollerProtection)voidsetUrlCacheProtection(boolean urlCacheProtection)voidsetXmlParsingProtection(boolean xmlParsingProtection)
 
- 
- 
- 
Method Detail- 
isAppContextProtectionpublic boolean isAppContextProtection() 
 - 
setAppContextProtectionpublic void setAppContextProtection(boolean appContextProtection) 
 - 
isAWTThreadProtectionpublic boolean isAWTThreadProtection() 
 - 
setAWTThreadProtectionpublic void setAWTThreadProtection(boolean awtThreadProtection) 
 - 
isGcDaemonProtectionpublic boolean isGcDaemonProtection() 
 - 
setGcDaemonProtectionpublic void setGcDaemonProtection(boolean gcDaemonProtection) 
 - 
isTokenPollerProtectionpublic boolean isTokenPollerProtection() 
 - 
setTokenPollerProtectionpublic void setTokenPollerProtection(boolean tokenPollerProtection) 
 - 
isUrlCacheProtectionpublic boolean isUrlCacheProtection() 
 - 
setUrlCacheProtectionpublic void setUrlCacheProtection(boolean urlCacheProtection) 
 - 
isXmlParsingProtectionpublic boolean isXmlParsingProtection() 
 - 
setXmlParsingProtectionpublic void setXmlParsingProtection(boolean xmlParsingProtection) 
 - 
isLdapPoolProtectionpublic boolean isLdapPoolProtection() 
 - 
setLdapPoolProtectionpublic void setLdapPoolProtection(boolean ldapPoolProtection) 
 - 
isDriverManagerProtectionpublic boolean isDriverManagerProtection() 
 - 
setDriverManagerProtectionpublic void setDriverManagerProtection(boolean driverManagerProtection) 
 - 
getForkJoinCommonPoolProtectionpublic boolean getForkJoinCommonPoolProtection() 
 - 
setForkJoinCommonPoolProtectionpublic void setForkJoinCommonPoolProtection(boolean forkJoinCommonPoolProtection) 
 - 
getClassesToInitializepublic java.lang.String getClassesToInitialize() 
 - 
setClassesToInitializepublic void setClassesToInitialize(java.lang.String classesToInitialize) 
 - 
getInitSeedGeneratorpublic boolean getInitSeedGenerator() 
 - 
setInitSeedGeneratorpublic void setInitSeedGenerator(boolean initSeedGenerator) 
 - 
lifecycleEventpublic void lifecycleEvent(LifecycleEvent event) Description copied from interface:LifecycleListenerAcknowledge the occurrence of the specified event.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Parameters:
- event- LifecycleEvent that has occurred
 
 
- 
 
-