Top Methods
org.apache.tomcat

public Interface ContextBind

Known Direct Subinterfaces
org.apache.catalina.Context

Method Summary

Modifier and TypeMethod and Description
public ClassLoader

Returns:

If the class loader has been changed by the method it will return the thread context class loader in use when the method was called. If no change was made then this method returns null.
bind
(boolean
Should a java.security.PrivilegedAction be used when obtaining the current thread context class loader and setting the new one?
usePrivilegedAction
,
ClassLoader
The current class loader if known to save this method having to look it up
originalClassLoader
)

Change the current thread context class loader to the web application class loader.

public void
unbind(boolean
Should a java.security.PrivilegedAction be used when setting the current thread context class loader?
usePrivilegedAction
,
ClassLoader
The class loader to restore as the thread context class loader
originalClassLoader
)

Restore the current thread context class loader to the original class loader in used before bind(boolean, ClassLoader) was called.

Method Detail

bindback to summary
public ClassLoader bind(boolean usePrivilegedAction, ClassLoader originalClassLoader)

Change the current thread context class loader to the web application class loader. If no web application class loader is defined, or if the current thread is already using the web application class loader then no change will be made. If the class loader is changed and a org.apache.catalina.ThreadBindingListener is configured then org.apache.catalina.ThreadBindingListener#bind() will be called after the change has been made.

Parameters
usePrivilegedAction:boolean

Should a java.security.PrivilegedAction be used when obtaining the current thread context class loader and setting the new one?

originalClassLoader:ClassLoader

The current class loader if known to save this method having to look it up

Returns:ClassLoader

If the class loader has been changed by the method it will return the thread context class loader in use when the method was called. If no change was made then this method returns null.

unbindback to summary
public void unbind(boolean usePrivilegedAction, ClassLoader originalClassLoader)

Restore the current thread context class loader to the original class loader in used before 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 org.apache.catalina.ThreadBindingListener is configured then org.apache.catalina.ThreadBindingListener#unbind() will be called before the change is made.

Parameters
usePrivilegedAction:boolean

Should a java.security.PrivilegedAction be used when setting the current thread context class loader?

originalClassLoader:ClassLoader

The class loader to restore as the thread context class loader