Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.0.1
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      ICEfaces, WindowScope
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      Management of WindowScope requires HTTP messages sent to the server whenever browser navigation or window closing occurs. This results in extra network traffic, sometimes problematic interaction with authentication (since window closing can occur after session expiry), complexities for portlet integration, and complexity for load and functional testing.

      It should be possible for WindowScope to be managed lazily; that is, if the WindowScope map is empty, no HTTP requests need be sent. Since objects can be added to WindowScope at any time during the JSF lifecycle, it is likely that WindowScope JavaScript initialization must be inserted just prior to the body closing tag during the render phase.

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment -

          There are two other sub-issues left to be solved before window lazy scope is fully functional:

          a) When view scope beans are present in the page the lazy window scope should be automatically turned off because the disposal of the view scope beans rely on the 'dispose-window' request as well.

          b) The pushIds used to identify views and managed by SessionViewManager have to be clean-up to avoid their accumulation.

          Show
          Mircea Toma added a comment - There are two other sub-issues left to be solved before window lazy scope is fully functional: a) When view scope beans are present in the page the lazy window scope should be automatically turned off because the disposal of the view scope beans rely on the 'dispose-window' request as well. b) The pushIds used to identify views and managed by SessionViewManager have to be clean-up to avoid their accumulation.
          Hide
          Mircea Toma added a comment - - edited

          Detect now if view scope map contains any beans. When beans are present the window lazy scope feature is disabled to make sure the 'dispose-window' request is sent.

          Show
          Mircea Toma added a comment - - edited Detect now if view scope map contains any beans. When beans are present the window lazy scope feature is disabled to make sure the 'dispose-window' request is sent.
          Hide
          Ted Goddard added a comment - - edited

          It should be possible to rely on the automatic cleanup in ICEpush for session-based notification:

          PushRenderer.addCurrentSession(groupName) records groupName in the session. (addCurrentViewsToGroup() would not be called as it is currently.)

          For each JSF view created, PushContext.addGroupMember(groupName, viewPushId) is called for each groupName recorded in the session.

          A list of views is not recorded by ICEfaces, and the ICEpush groups are kept alive only by the activity of each viewPushId.

          Note that this would not retroactively add views, but retroactive adding is fundamentally incompatible with lazy push initialization, since early pages will be loaded that do not even participate in push notification.

          (It's not obvious that there is a real use case for retroactive adding of views – most applications will have certain pages that require push and certain pages that do not. addCurrentSession() is used as a convenience so that push pages do not need to be accounted for individually, but addCurrentSession() would always be called when one of these pages is rendered, removing the need for retroactive addition of the page. If a page fragment dynamically required push to be supported, then addCurrentSession() would be called when the user interacted with that page causing the fragment to be updated, again requiring no retroactive addition.)

          Show
          Ted Goddard added a comment - - edited It should be possible to rely on the automatic cleanup in ICEpush for session-based notification: PushRenderer.addCurrentSession(groupName) records groupName in the session. (addCurrentViewsToGroup() would not be called as it is currently.) For each JSF view created, PushContext.addGroupMember(groupName, viewPushId) is called for each groupName recorded in the session. A list of views is not recorded by ICEfaces, and the ICEpush groups are kept alive only by the activity of each viewPushId. Note that this would not retroactively add views, but retroactive adding is fundamentally incompatible with lazy push initialization, since early pages will be loaded that do not even participate in push notification. (It's not obvious that there is a real use case for retroactive adding of views – most applications will have certain pages that require push and certain pages that do not. addCurrentSession() is used as a convenience so that push pages do not need to be accounted for individually, but addCurrentSession() would always be called when one of these pages is rendered, removing the need for retroactive addition of the page. If a page fragment dynamically required push to be supported, then addCurrentSession() would be called when the user interacted with that page causing the fragment to be updated, again requiring no retroactive addition.)
          Hide
          Mircea Toma added a comment - - edited

          My understanding of how PushRederer.addCurrentSession() method should behave seems to be different. Currently when PushRederer.addCurrentSession() is called (with a certain group name) the implementation will make sure that any active view belonging to the current session is part of that group. In the future if a new view is created within the same session then that view is added as well to the group. Discarded views in the same session will be removed from the group.

          If we don't want to keep track of the views then the implementation is significantly simplified but then the behavior of PushRederer.addCurrentSession() method will be highly misleading.

          Show
          Mircea Toma added a comment - - edited My understanding of how PushRederer.addCurrentSession() method should behave seems to be different. Currently when PushRederer.addCurrentSession() is called (with a certain group name) the implementation will make sure that any active view belonging to the current session is part of that group. In the future if a new view is created within the same session then that view is added as well to the group. Discarded views in the same session will be removed from the group. If we don't want to keep track of the views then the implementation is significantly simplified but then the behavior of PushRederer.addCurrentSession() method will be highly misleading .
          Hide
          Mircea Toma added a comment -

          Modified SessionViewManager to not keep track of the active pushIds. New views are added to a session wide group only after PushRenderer.addCurrentSession method is called. Renamed also SessionViewManager methods to better reflect the new behavior.

          Show
          Mircea Toma added a comment - Modified SessionViewManager to not keep track of the active pushIds. New views are added to a session wide group only after PushRenderer.addCurrentSession method is called. Renamed also SessionViewManager methods to better reflect the new behavior.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: