Package org.apache.catalina.core
Class ThreadLocalLeakPreventionListener
java.lang.Object
org.apache.catalina.core.FrameworkListener
org.apache.catalina.core.ThreadLocalLeakPreventionListener
- All Implemented Interfaces:
- ContainerListener,- LifecycleListener
A 
LifecycleListener that triggers the renewal of threads in Executor pools when a Context is 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 Server elements.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final StringManagerThe string manager for this package.Fields inherited from class org.apache.catalina.core.FrameworkListenercontextListeners
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcontainerEvent(ContainerEvent event) Acknowledge the occurrence of the specified event.protected LifecycleListenercreateLifecycleListener(Context context) Create a lifecycle listener which will then be added to the specified context.voidlifecycleEvent(LifecycleEvent event) Listens forLifecycleEventfor the start of theServerto initialize itself and then for after_stop events of eachContext.Methods inherited from class org.apache.catalina.core.FrameworkListenerprocessContainerAddChild, processContainerRemoveChild, registerContextListener, registerListenersForEngine, registerListenersForHost, registerListenersForServer
- 
Field Details- 
smThe string manager for this package.
 
- 
- 
Constructor Details- 
ThreadLocalLeakPreventionListenerpublic ThreadLocalLeakPreventionListener()
 
- 
- 
Method Details- 
lifecycleEventListens forLifecycleEventfor the start of theServerto initialize itself and then for after_stop events of eachContext.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Overrides:
- lifecycleEventin class- FrameworkListener
- Parameters:
- event- LifecycleEvent that has occurred
 
- 
containerEventDescription copied from interface:ContainerListenerAcknowledge the occurrence of the specified event.- Specified by:
- containerEventin interface- ContainerListener
- Overrides:
- containerEventin class- FrameworkListener
- Parameters:
- event- ContainerEvent that has occurred
 
- 
createLifecycleListenerDescription copied from class:FrameworkListenerCreate a lifecycle listener which will then be added to the specified context.- Specified by:
- createLifecycleListenerin class- FrameworkListener
- Parameters:
- context- the associated Context
- Returns:
- the lifecycle listener
 
 
-