Class ThreadLocalLeakPreventionListener

  • All Implemented Interfaces:
    ContainerListener, LifecycleListener

    public class ThreadLocalLeakPreventionListener
    extends FrameworkListener
    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.