Package org.apache.catalina.core
Class ThreadLocalLeakPreventionListener
- java.lang.Object
- 
- org.apache.catalina.core.ThreadLocalLeakPreventionListener
 
- 
- All Implemented Interfaces:
- ContainerListener,- LifecycleListener
 
 public class ThreadLocalLeakPreventionListener extends java.lang.Object implements LifecycleListener, ContainerListener ALifecycleListenerthat triggers the renewal of threads in Executor pools when aContextis being stopped to avoid thread-local related memory leaks.Note : active threads will be renewed one by one when they come back to the pool after executing their task, see ThreadPoolExecutor.afterExecute().This listener must only be nested within Serverelements.
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringManagersmThe string manager for this package.
 - 
Constructor SummaryConstructors Constructor Description ThreadLocalLeakPreventionListener()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontainerEvent(ContainerEvent event)Acknowledge the occurrence of the specified event.voidlifecycleEvent(LifecycleEvent event)Listens forLifecycleEventfor the start of theServerto initialize itself and then for after_stop events of eachContext.protected voidprocessContainerAddChild(Container parent, Container child)protected voidprocessContainerRemoveChild(Container parent, Container child)
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm The string manager for this package.
 
- 
 - 
Method Detail- 
lifecycleEventpublic void lifecycleEvent(LifecycleEvent event) Listens forLifecycleEventfor the start of theServerto initialize itself and then for after_stop events of eachContext.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Parameters:
- event- LifecycleEvent that has occurred
 
 - 
containerEventpublic void containerEvent(ContainerEvent event) Description copied from interface:ContainerListenerAcknowledge the occurrence of the specified event.- Specified by:
- containerEventin interface- ContainerListener
- Parameters:
- event- ContainerEvent that has occurred
 
 - 
processContainerAddChildprotected void processContainerAddChild(Container parent, Container child) 
 
- 
 
-