Apache Tomcat 6.0.30

org.apache.catalina.core
Class JreMemoryLeakPreventionListener

java.lang.Object
  extended by 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.


Constructor Summary
JreMemoryLeakPreventionListener()
           
 
Method Summary
 boolean isAppContextProtection()
           
 boolean isGcDaemonProtection()
           
 boolean isKeepAliveProtection()
           
 boolean isLdapPoolProtection()
           
 boolean isSecurityLoginConfigurationProtection()
           
 boolean isSecurityPolicyProtection()
           
 boolean isTokenPollerProtection()
           
 boolean isUrlCacheProtection()
           
 boolean isXmlParsingProtection()
           
 void lifecycleEvent(LifecycleEvent event)
          Acknowledge the occurrence of the specified event.
 void setAppContextProtection(boolean appContextProtection)
           
 void setGcDaemonProtection(boolean gcDaemonProtection)
           
 void setKeepAliveProtection(boolean keepAliveProtection)
           
 void setLdapPoolProtection(boolean ldapPoolProtection)
           
 void setSecurityLoginConfigurationProtection(boolean securityLoginConfigurationProtection)
           
 void setSecurityPolicyProtection(boolean securityPolicyProtection)
           
 void setTokenPollerProtection(boolean tokenPollerProtection)
           
 void setUrlCacheProtection(boolean urlCacheProtection)
           
 void setXmlParsingProtection(boolean xmlParsingProtection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JreMemoryLeakPreventionListener

public JreMemoryLeakPreventionListener()
Method Detail

isAppContextProtection

public boolean isAppContextProtection()

setAppContextProtection

public void setAppContextProtection(boolean appContextProtection)

isGcDaemonProtection

public boolean isGcDaemonProtection()

setGcDaemonProtection

public void setGcDaemonProtection(boolean gcDaemonProtection)

isKeepAliveProtection

public boolean isKeepAliveProtection()

setKeepAliveProtection

public void setKeepAliveProtection(boolean keepAliveProtection)

isSecurityPolicyProtection

public boolean isSecurityPolicyProtection()

setSecurityPolicyProtection

public void setSecurityPolicyProtection(boolean securityPolicyProtection)

isSecurityLoginConfigurationProtection

public boolean isSecurityLoginConfigurationProtection()

setSecurityLoginConfigurationProtection

public void setSecurityLoginConfigurationProtection(boolean securityLoginConfigurationProtection)

isTokenPollerProtection

public boolean isTokenPollerProtection()

setTokenPollerProtection

public void setTokenPollerProtection(boolean tokenPollerProtection)

isUrlCacheProtection

public boolean isUrlCacheProtection()

setUrlCacheProtection

public void setUrlCacheProtection(boolean urlCacheProtection)

isXmlParsingProtection

public boolean isXmlParsingProtection()

setXmlParsingProtection

public void setXmlParsingProtection(boolean xmlParsingProtection)

isLdapPoolProtection

public boolean isLdapPoolProtection()

setLdapPoolProtection

public void setLdapPoolProtection(boolean ldapPoolProtection)

lifecycleEvent

public void lifecycleEvent(LifecycleEvent event)
Description copied from interface: LifecycleListener
Acknowledge the occurrence of the specified event.

Specified by:
lifecycleEvent in interface LifecycleListener
Parameters:
event - LifecycleEvent that has occurred

Apache Tomcat 6.0.30

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.