org.apache.commons.beanutils
public class ContextClassLoaderLocal extends java.lang.Object
Thread.getContextClassLoader()| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object |
globalValue |
private boolean |
globalValueInitialized |
private java.util.Map |
valueByClassLoader |
| Constructor and Description |
|---|
ContextClassLoaderLocal() |
| Modifier and Type | Method and Description |
|---|---|
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
|
private java.util.Map valueByClassLoader
private boolean globalValueInitialized
private java.lang.Object globalValue
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)
Copyright (c) 2001-2004 - Apache Software Foundation