Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2396

@PreDestroy method of Bean in CustomScope not invoked

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-beta
    • Component/s: JSR-314
    • Labels:
      None

      Description

      Testing the mojarra 2.0.1 sample "custom-bean-scope", MyFaces does NOT behave like Mojarra.
      The problem is that MyFaces does not propagate a PreDestroyCustomScopeEvent correctly. The following code is from the mojarra sample and shows how the event is published:

      public void notifyDestroy()

      { // notify interested parties that this scope is being // destroyed ScopeContext scopeContext = new ScopeContext(SCOPE_NAME, this); application.publishEvent(FacesContext.getCurrentInstance(), PreDestroyCustomScopeEvent.class, scopeContext); }

      However, the @PreDestroy method of the Bean, which is stored in the scope, is not invoked.

        Attachments

        1. myfaces-2396-no-loop.patch
          14 kB
          Jakob Korherr
        2. myfaces-2396-final.patch
          34 kB
          Jakob Korherr
        3. myfaces_2396_proposal.patch
          31 kB
          Jakob Korherr

          Issue Links

            Activity

              People

              • Assignee:
                lu4242 Leonardo Uribe
                Reporter:
                jakobkorherr Jakob Korherr
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: