Details
-
Type: Task
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: EE-3.3.0.GA_P02, EE-4.0.0.GA
-
Fix Version/s: EE-4.1.0.GA, EE-3.3.0.GA_P04
-
Component/s: Framework
-
Labels:None
-
Environment:All
-
Assignee Priority:P2
-
Support Case References:Support Case #13404 - https://icesoft.my.salesforce.com/5007000001AfT9n
Description
Changing to a Window scoped bean doesn't have any changes. Also using the @WindowDisposed annotation on the View scoped bean does cause the bean to be disposed but it doesn't cause it to be removed from the map. If they were disposed and removed from the map this might help to alleviate this issue.
This does seem to be the expected JSF behavior of the view map and view scoped beans. This JIRA is intended to review this behavior to see if there is a bug in JSF or if there is something we can do with the ICEfaces window scope to help prevent this from happening.
-
Hide
- Case13404Example.war
- 8.30 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/.../TestPageOne.class 1 kB
- WEB-INF/classes/.../TestPageTwo.class 1 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icefaces-compat.jar 4.18 MB
- WEB-INF/lib/icefaces.jar 633 kB
- WEB-INF/lib/javax.faces.jar 2.54 MB
- WEB-INF/web.xml 2 kB
- index.xhtml 0.5 kB
- testPage1.xhtml 1 kB
- testPage2.xhtml 0.4 kB
-
Hide
- Case13404Example.zip
- 22 kB
- Arran Mccullough
-
- Case13404Example/build.xml 3 kB
- Case13404Example/.../ant-deploy.xml 2 kB
- Case13404Example/.../build-impl.xml 80 kB
- Case13404Example/.../genfiles.properties 0.5 kB
- Case13404Example/.../private.properties 0.6 kB
- Case13404Example/nbproject/.../private.xml 0.9 kB
- Case13404Example/.../project.properties 4 kB
- Case13404Example/nbproject/project.xml 0.9 kB
- Case13404Example/src/conf/MANIFEST.MF 0.0 kB
- Case13404Example/src/.../TestPageOne.java 0.8 kB
- Case13404Example/src/.../TestPageTwo.java 0.7 kB
- Case13404Example/web/index.xhtml 0.5 kB
- Case13404Example/web/.../context.xml 0.1 kB
- Case13404Example/web/testPage1.xhtml 1 kB
- Case13404Example/web/testPage2.xhtml 0.4 kB
- Case13404Example/web/WEB-INF/web.xml 2 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Need to analyze what JSF is doing here and why the expired views don't seem to be collected promptly.
Debugging the test application confirms the disconnect observed between the view scoped bean instance limit and view scope map limit. This seems to be an issue that Mojarra has acknowledged, see https://java.net/jira/browse/JAVASERVERFACES-4015 .
To workaround this Mojarra issue the values of com.sun.faces.numberOfLogicalViews and com.sun.faces.application.view.activeViewMapsSize context parameters should always be equal.
In use cases where the memory consumption is too high (due to too many view scoped bean instances) request scoped beans can be used instead coupled with request parameters set by f:param (see example: http://www.mkyong.com/jsf2/jsf-2-param-example/ ).
Attached test case showing this behavior:
Steps:
Test Case 1 - Single search, open multiple results
1. Access TestView\testPage1.jsf. Keep this window/tab open.
2. Open results in new tabs, that will open TestView\testPage2.jsf. Do that for 11 times. You should have 12 tabs at the end of this.
3. Go back to the tab in Step 1, hit the "Click Next" button. "Server Internal Error" pops up. Backend console displays the ViewExpiredExceptionMessage.
Test Case 2 - Multiple search, open one result
1. Access TestView\testPage1.jsf. Keep this window/tab open.
2. Open one result in a new tab.
3. Go back to the tab in Step 1, and hit "Search" for 11 times.
4. Go back to the tab in Step 2, and hit "Click Me". "Server Internal Error" pops up. Backend console displays the ViewExpiredExceptionMessage.