public class ThreadLocalUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
clearAllThreadLocals()
Clear
ThreadLocals of the current thread. |
static void |
registerCleaner(Runnable cleaner)
Intended for internal use only so other modules of Apache POi
can add cleaners.
|
public static void clearAllThreadLocals()
ThreadLocals of the current thread.
This can be used to clean out a thread before "returning"
it to a thread-pool or a Web-Container like Tomcat.
Usually org.apache.xmlbeans.ThreadLocalUtil#clearAllThreadLocals()
should be called as well to clear out some more ThreadLocals which
are created by the XMLBeans library internally.