ContainerListener, LifecycleListenerpublic class ThreadLocalLeakPreventionListener extends java.lang.Object implements LifecycleListener, ContainerListener
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().
| Modifier and Type | Field | Description |
|---|---|---|
protected static StringManager |
sm |
The string manager for this package.
|
| Constructor | Description |
|---|---|
ThreadLocalLeakPreventionListener() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
containerEvent(ContainerEvent event) |
Acknowledge the occurrence of the specified event.
|
void |
lifecycleEvent(LifecycleEvent event) |
Listens for
LifecycleEvent for the start of the Server to
initialize itself and then for after_stop events of each Context. |
protected void |
processContainerAddChild(Container parent,
Container child) |
|
protected void |
processContainerRemoveChild(Container parent,
Container child) |
protected static final StringManager sm
public void lifecycleEvent(LifecycleEvent event)
LifecycleEvent for the start of the Server to
initialize itself and then for after_stop events of each Context.lifecycleEvent in interface LifecycleListenerevent - LifecycleEvent that has occurredpublic void containerEvent(ContainerEvent event)
ContainerListenercontainerEvent in interface ContainerListenerevent - ContainerEvent that has occurredprotected void processContainerAddChild(Container parent, Container child)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.