wbirkhead schrieb: > Gerald Müllan-3 wrote: > >>> I can see that in some cases it may help, perhaps you wanna share the >>> >> impl ? >> >> I just removed the two lines with the weak references. So, only ugly >> duplication of code. :) >> >> >> > > Gerald, at the risk of sounding like a novice, can you point me to the lines > of code with the weak references that you mention above? This would be a > HUGE help. >
JspStateManagerImpl has this method: public synchronized void add(FacesContext context, Object state) { Object key = new SerializedViewKey(context); _serializedViews.put(key, state); while (_keys.remove(key)); _keys.add(key); int views = getNumberOfViewsInSession(context); while (_keys.size() > views) { key = _keys.remove(0); Object oldView = _serializedViews.remove(key); if (oldView != null) { getOldSerializedViewsMap().put(key, oldView); } } } The second while loop is trimming the "strong-referenced" pool down to the necessary size, and adding the removed entries into the weak pool. So just commenting out the call to getOldSerializedViewsMap().put(key, oldView); should do the trick. Regards, Simon