myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (MYFACES-1960) Make the state-manager (JspStateManagerImpl) behaviour storing the previous view-states in MyFaces optional
Date Tue, 09 Sep 2008 02:31:44 GMT


Leonardo Uribe commented on MYFACES-1960:

If no objections I'll commit this patch soon. The only thing that I don't like is the call
to FacesContext.getCurrentInstance in get method, but change the signature of this function
is worse (I prefer remain stable the api, because some users used to subclass JspStateManagerImpl).

> Make the state-manager (JspStateManagerImpl) behaviour storing the previous view-states
in MyFaces optional
> -----------------------------------------------------------------------------------------------------------
>                 Key: MYFACES-1960
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Improvement
>    Affects Versions: 1.1.6, 1.2.4
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-1960-JSF11.patch, MYFACES-1960-JSF12.patch
> Actually the class org.apache.myfaces.application.jsp.JspStateManagerImpl.SerializedViewCollection
store the old views using:
>         protected Map getOldSerializedViewsMap() {
>             if (_oldSerializedViews == null) {
>                 _oldSerializedViews = new ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK,
>             }
>             return _oldSerializedViews;
>         }
> Right now, this part is used when server side saving is enabled, as a second level cache.
If the view is not available on _serializedViews (the map that holds the views in first place)
, it tries to get it from _oldSerializedViews. If it is found use it but if not just return
> The default should be that this behaviour is off (contrary to the current case).
> It is more, there should be the possibility to use soft references instead weak references,
so the user can tune this by its own needs.
> The idea for solve this is create a param called org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE
with the possible values:
> soft: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT, true)
> weak: use an ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK, true)
> off, no: default, no cache is used
> The changes should be applied on 1.1 and 1.2.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message