if (value instanceof List && keepList) {
value = new ListVarContainer((List) value);
}
if (!allowSerialization) {
TransientObjectWrapper wrapper = null;
Object currentValue = _environment.getSessionVars().get(name);
if (currentValue instanceof TransientObjectWrapper) {
wrapper = (TransientObjectWrapper) currentValue;
}
else {
wrapper = new TransientObjectWrapper();
_environment.getSessionVars().put(name, wrapper);
}
wrapper.set(value);
}
else {
_environment.getSessionVars().put(name, value);
}