javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-905

Invoke @PreDestroy on ViewScoped ManagedBeans upon session expiration

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: Managed Beans
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      905
    • Status Whiteboard:
      Hide

      size_large importance_small

      Show
      size_large importance_small

      Description

      When session expiration occurs it would be nice if the @PreDestroy of ViewScoped
      ManagedBeans gets invoked.

      https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1839

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          triage

          Show
          Ed Burns added a comment - triage
          Hide
          ssilvert added a comment -

          Hi Ed,

          Do you think this will be fixed in 2.2? I'm seeing more complaints about it.

          Stan

          Show
          ssilvert added a comment - Hi Ed, Do you think this will be fixed in 2.2? I'm seeing more complaints about it. Stan
          Hide
          Ed Burns added a comment -

          I can commit to making sure it works for the new javax.faces.flow.ViewScoped managed beans, which is based on CDI.

          I will also investigate what it will take to make it work for the non-CDI based ones as well.

          Thanks for bringing my attention to it.

          Show
          Ed Burns added a comment - I can commit to making sure it works for the new javax.faces.flow.ViewScoped managed beans, which is based on CDI. I will also investigate what it will take to make it work for the non-CDI based ones as well. Thanks for bringing my attention to it.
          Hide
          Ed Burns added a comment -

          testcase showing problem

          Show
          Ed Burns added a comment - testcase showing problem
          Hide
          Ed Burns added a comment -

          This one is proving very tricky due to the many points in time and different scenarios where sessions can be invalidated. The fix for this must be very closely scrutinized, and, more importantly, must pass all the automated tests.

          Show
          Ed Burns added a comment - This one is proving very tricky due to the many points in time and different scenarios where sessions can be invalidated. The fix for this must be very closely scrutinized, and, more importantly, must pass all the automated tests.
          Hide
          Ed Burns added a comment -

          Mojarra changes.

          Show
          Ed Burns added a comment - Mojarra changes.
          Hide
          ssilvert added a comment -

          We're also getting reports of memory leaks with view-scoped beans. I've verified the leak, but not traced its exact cause. I'm assuming that the leak is related to this issue.

          Any opinion on that or insight into how the instances are referenced? I'm assuming that if view-scoped beans aren't eligible for GC when the session ends then they must be tied to application scope or to a ThreadLocal. Any other possibilities?

          Show
          ssilvert added a comment - We're also getting reports of memory leaks with view-scoped beans. I've verified the leak, but not traced its exact cause. I'm assuming that the leak is related to this issue. Any opinion on that or insight into how the instances are referenced? I'm assuming that if view-scoped beans aren't eligible for GC when the session ends then they must be tied to application scope or to a ThreadLocal. Any other possibilities?
          Hide
          Ed Burns added a comment -

          See JAVASERVERFACES-2561 for implementation.

          Show
          Ed Burns added a comment - See JAVASERVERFACES-2561 for implementation.

            People

            • Assignee:
              Ed Burns
              Reporter:
              jack_van_ooststroom
            • Votes:
              8 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 34 minutes
                4h 34m