|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.beanutils.ContextClassLoaderLocal
A value that is provided per (thread) context classloader. Patterned after ThreadLocal. There is a separate value used when Thread.getContextClassLoader() is null. This mechanism provides isolation for web apps deployed in the same container. Note: A WeakHashMap bug in several 1.3 JVMs results in a memory leak for those JVMs.
Thread.getContextClassLoader()
Field Summary | |
private java.lang.Object |
globalValue
|
private boolean |
globalValueInitialized
|
private java.util.Map |
valueByClassLoader
|
Constructor Summary | |
ContextClassLoaderLocal()
|
Method Summary | |
java.lang.Object |
get()
Gets the instance which provides the functionality for BeanUtils . |
protected java.lang.Object |
initialValue()
Returns the initial value for this ContextClassLoaderLocal variable. |
void |
set(java.lang.Object value)
Sets the value - a value is provided per (thread) context classloader. |
void |
unset()
Unsets the value associated with the current thread's context classloader |
void |
unset(java.lang.ClassLoader classLoader)
Unsets the value associated with the given classloader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Map valueByClassLoader
private boolean globalValueInitialized
private java.lang.Object globalValue
Constructor Detail |
public ContextClassLoaderLocal()
Method Detail |
protected java.lang.Object initialValue()
public java.lang.Object get()
BeanUtils
.
This is a pseudo-singleton - an single instance is provided per (thread) context classloader.
This mechanism provides isolation for web apps deployed in the same container.
public void set(java.lang.Object value)
value
- the object to be associated with the entrant thread's context classloaderpublic void unset()
public void unset(java.lang.ClassLoader classLoader)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |