ICEfaces
  1. ICEfaces
  2. ICE-4459

Page reload with concurrentDOMViews and standardRequestScope set to false creates new instance of request beans.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      1.8
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      In version 1.7, when concurrentDOMViews and standardRequestScope are both set to false, a page reload would NOT cause the current request-scoped beans to be disposed and new instances of request-scoped beans to be created. Basically, request-scoped beans would hang around between reloads.

      In version 1.8, using the same configuration, request-scoped beans are now disposed and new instances created. The one caveat is that if DisposableBean is implemented, the dispose() method is not called.

      We need to decide between:

      1) Reverting the behaviour to work like 1.7
      2) Leave the existing behaviour but fix the dispose() call
      3) Allow both behaviours through some kind of configuration

        Activity

        Hide
        Greg Dick added a comment -

        I've restored the behavior to what it was in 1.7.2. The noticeable problem was that all request scoped objects were going out of scope on reload, but the dispose() method was not being called on any request scoped beans implementing the DisposableBean interface. This was due to a new ExternalContext always being created on reload. This has been restored in svn version: 18861.

        The current behaviour matrix is attached. There seems to be an anomaly with concurrentDOMViews = true and standardRequestScope = false. It might be argued that the request scoped beans should stick around in the case of reload. Digging into this, I found that on reload an $

        {app}

        /block/disposeViews request is sent to the server first, prior to the client re-requesting the page and with concurrentDOMViews set to true, a disposeViews request actually disposes the Views as opposed to only reusing them in the concurrentDOMViews=false case. As part of this disposing the views, the externalContext is disposed. When the View is disposed, all its member variables of course are gone too. This means it would be tricky to keep the externalContext around with the request Map containing the beans. I suggest leaving the behaviour just as it is.

        Show
        Greg Dick added a comment - I've restored the behavior to what it was in 1.7.2. The noticeable problem was that all request scoped objects were going out of scope on reload, but the dispose() method was not being called on any request scoped beans implementing the DisposableBean interface. This was due to a new ExternalContext always being created on reload. This has been restored in svn version: 18861. The current behaviour matrix is attached. There seems to be an anomaly with concurrentDOMViews = true and standardRequestScope = false. It might be argued that the request scoped beans should stick around in the case of reload. Digging into this, I found that on reload an $ {app} /block/disposeViews request is sent to the server first, prior to the client re-requesting the page and with concurrentDOMViews set to true, a disposeViews request actually disposes the Views as opposed to only reusing them in the concurrentDOMViews=false case. As part of this disposing the views, the externalContext is disposed. When the View is disposed, all its member variables of course are gone too. This means it would be tricky to keep the externalContext around with the request Map containing the beans. I suggest leaving the behaviour just as it is.
        Hide
        Greg Dick added a comment -

        Current behaviour matrix in 1.8

        Show
        Greg Dick added a comment - Current behaviour matrix in 1.8
        Hide
        Krashan Brahmanjara added a comment -

        What about with backward-compatibility?
        I got some apps created and optimized for icefaces 1.7.*, concurrentDOMViews and standardRequestScope are both set to false too.

        In year 2008 everything works well but now on 1.8.1 i got performance issues. Request beans and all associated data are recreated and reloaded very often.
        My navigations are based on menu actions and "navigation-case" with "redirect" (support for "back" button and history).

        I don't wan't change beans scope to session and remove "redirect". Is any solution?

        Show
        Krashan Brahmanjara added a comment - What about with backward-compatibility? I got some apps created and optimized for icefaces 1.7.*, concurrentDOMViews and standardRequestScope are both set to false too. In year 2008 everything works well but now on 1.8.1 i got performance issues. Request beans and all associated data are recreated and reloaded very often. My navigations are based on menu actions and "navigation-case" with "redirect" (support for "back" button and history). I don't wan't change beans scope to session and remove "redirect". Is any solution?
        Hide
        Krashan Brahmanjara added a comment -

        Behaviour from RequestBeanChart.TIF doesn't work for Icefaces 1.8.1 -case concurrentDOMViews and standardRequestScope are both set to false

        Show
        Krashan Brahmanjara added a comment - Behaviour from RequestBeanChart.TIF doesn't work for Icefaces 1.8.1 -case concurrentDOMViews and standardRequestScope are both set to false
        Hide
        Krashan Brahmanjara added a comment -

        Above issues are visible on 1.8.1 revison 19141 from trunk.

        Show
        Krashan Brahmanjara added a comment - Above issues are visible on 1.8.1 revison 19141 from trunk.
        Hide
        Ken Fyten added a comment -

        Krashan, please create a new JIRA for this as this one cannot be re-opened since it has already shipped with associated changes in 1.8.1. Also, you need to attach a simple test application to demonstrate the issue you are reporting to the new JIRA.

        Show
        Ken Fyten added a comment - Krashan, please create a new JIRA for this as this one cannot be re-opened since it has already shipped with associated changes in 1.8.1. Also, you need to attach a simple test application to demonstrate the issue you are reporting to the new JIRA.
        Hide
        Muhammad Asad Ullah Bhatti added a comment -

        Hi!
        I'm using iceFaces 1.8.2 and I still face the problem as "In version 1.7, when concurrentDOMViews and standardRequestScope are both set to false, a page reload would NOT cause the current request-scoped beans to be disposed and new instances of request-scoped beans to be created. Basically, request-scoped beans would hang around between reloads. "

        Show
        Muhammad Asad Ullah Bhatti added a comment - Hi! I'm using iceFaces 1.8.2 and I still face the problem as "In version 1.7, when concurrentDOMViews and standardRequestScope are both set to false, a page reload would NOT cause the current request-scoped beans to be disposed and new instances of request-scoped beans to be created. Basically, request-scoped beans would hang around between reloads. "

          People

          • Assignee:
            Ken Fyten
            Reporter:
            Deryk Sinotte
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: