public interface ContextBind
Modifier and Type | Method and Description |
---|---|
java.lang.ClassLoader |
bind(boolean usePrivilegedAction,
java.lang.ClassLoader originalClassLoader)
Change the current thread context class loader to the web application
class loader.
|
void |
unbind(boolean usePrivilegedAction,
java.lang.ClassLoader originalClassLoader)
Restore the current thread context class loader to the original class
loader in used before
bind(boolean, ClassLoader) was called. |
java.lang.ClassLoader bind(boolean usePrivilegedAction, java.lang.ClassLoader originalClassLoader)
ThreadBindingListener
is configured then
ThreadBindingListener.bind()
will be called
after the change has been made.usePrivilegedAction
- Should a PrivilegedAction
be used when
obtaining the current thread context class loader and setting
the new one?originalClassLoader
- The current class loader if known to save this method having to
look it upvoid unbind(boolean usePrivilegedAction, java.lang.ClassLoader originalClassLoader)
bind(boolean, ClassLoader)
was called. If
no original class loader is passed to this method then no change will be
made. If the class loader is changed and a
ThreadBindingListener
is configured then
ThreadBindingListener.unbind()
will be called
before the change is made.usePrivilegedAction
- Should a PrivilegedAction
be used when
setting the current thread context class loader?originalClassLoader
- The class loader to restore as the thread context class loaderCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.