View to be restored was removed and cannot be retrieved from the map 
(JspStatemanagerImpl)
------------------------------------------------------------------------------------------

                 Key: MYFACES-1847
                 URL: https://issues.apache.org/jira/browse/MYFACES-1847
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions:  1.1.6-SNAPSHOT
         Environment: WinXP, Weblogic 9.2
            Reporter: Mohamed Thowbick
            Priority: Critical


Affected version: myfaces-impl-1.1.6-SNAPSHOT.jar


We have an web application which used myfaces,tomahawk and freemarker. The 
manin page of the application is been divided into 3 parts (Top Menu links), 
Tree menu (Left frame) and selected page to be displayed on the right side 
frame.

During the module test, we observed that myfaces is creating two serialized 
views. One for the left side tree2 menu jsf and the other for right side 
content jsf corresponding to the report item selected. Since the default number 
of views in the session is 20, myfaces will remove the weak referenced view if 
the number of views in the session exceeds the threshold. So we have done some 
regression on the tree menu items which had created more than 20 views. But the 
wierd thing is, it has removed the serialized view of the tree2 jsf in the mid 
of regression which was created in the initial stage and supposed to be made 
available in the map and to be restored when the other report menu items are 
selected. Due to this bug, our application is displaying the tree2 menu in the 
right side frame as well. We have to refresh/reload the page to get out of this 
issue.

When the other report items are selected, the application is trying to get the 
view from the serialized map but due to the bug in the code it's unable to find 
the view which was removed earlier and prints the message 

Exiting restoreTreeStructure - No serialized view found in server session!

Below is the suspected code snippet from 
JspStatemanagerImpl$SerializedViewCollection class

        while (_keys.remove(key)) ;
        _keys.add(key);

        int views = getNumberOfViewsInSession(context);
        
        while (_keys.size() > views) {
        key = _keys.remove(0);//View will be removed here


        Object oldView = _serializedViews.remove(key);
        
                if (oldView != null) {
                    getOldSerializedViewsMap().put(key, oldView);
                }
        


        }

Did anyone ever faced the same issue and managed to fix?


I hope someone out there might be able to help me out of this issue. I 
understand that there were some out of memory and perfomance issues in 
JspStatemanagerImpl of release myfaces-impl-1.1.6-SNAPSHOT which was fixed in 
myfaces-impl-1.2.X. But to use myfaces-impl-1.2.X, we should run the 
application in a server which supports JSP 2.1. We are using weblogic 9.2 which 
has JSP 2.0 container.

I am currently working on this issue to avoid removing the view which is to be 
restored later for release myfaces-impl-1.1.6-SNAPSHOT.

Let me know if further details required.
Would greatly appreciate if anyone help me out on this.


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

Reply via email to