MyFaces Core
  1. MyFaces Core
  2. MYFACES-2396

@PreDestroy method of Bean in CustomScope not invoked

    Details

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

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

        Issue Links

          Activity

          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Jakob Korherr made changes -
          Link This issue relates to MYFACES-2648 [ MYFACES-2648 ]
          Leonardo Uribe made changes -
          Fix Version/s 2.0.0-beta [ 12314537 ]
          Fix Version/s 2.0.0-alpha-2 [ 12314409 ]
          Leonardo Uribe made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 2.0.0-alpha-2 [ 12314409 ]
          Resolution Fixed [ 1 ]
          Jakob Korherr made changes -
          Status Reopened [ 4 ] Patch Available [ 10002 ]
          Jakob Korherr made changes -
          Attachment myfaces-2396-no-loop.patch [ 12426858 ]
          Leonardo Uribe made changes -
          Fix Version/s 2.0.0-alpha [ 12313389 ]
          Affects Version/s 2.0.0-alpha [ 12313389 ]
          Leonardo Uribe made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Leonardo Uribe made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Assignee Leonardo Uribe [ lu4242 ]
          Fix Version/s 2.0.0-alpha [ 12313389 ]
          Resolution Fixed [ 1 ]
          Jakob Korherr made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Jakob Korherr made changes -
          Attachment myfaces-2396-final.patch [ 12425494 ]
          Jakob Korherr made changes -
          Field Original Value New Value
          Attachment myfaces_2396_proposal.patch [ 12425137 ]
          Jakob Korherr created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development