ICEfaces
  1. ICEfaces
  2. ICE-10686

ViewExpiredException thrown in View intensive app

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major 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

      Description

      In this scenario, an application opens many different views in new windows/tabs (1 view/tab). Once the number for the numberOfLogicalViews have been reached, views still open will now throw a ViewExpiredException when used by the user as this view is no longer in the logical view map.

      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.

        Activity

        Hide
        Arran Mccullough added a comment -

        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.

        Show
        Arran Mccullough added a comment - 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.
        Hide
        Ken Fyten added a comment -

        Need to analyze what JSF is doing here and why the expired views don't seem to be collected promptly.

        Show
        Ken Fyten added a comment - Need to analyze what JSF is doing here and why the expired views don't seem to be collected promptly.
        Hide
        Mircea Toma added a comment -

        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/ ).

        Show
        Mircea Toma added a comment - 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/ ).

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: