myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Updated] (MYFACES-4038) Flow beans are destroyed before flow is finalized
Date Thu, 17 Mar 2016 23:17:33 GMT

     [ https://issues.apache.org/jira/browse/MYFACES-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Leonardo Uribe updated MYFACES-4038:
------------------------------------
       Resolution: Fixed
         Assignee: Leonardo Uribe
    Fix Version/s: 2.2.10
           Status: Resolved  (was: Patch Available)

The issue is valid. The finalizer must be called when the flow is still active but before
@PreDestroy is called.

> Flow beans are destroyed before flow is finalized
> -------------------------------------------------
>
>                 Key: MYFACES-4038
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4038
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.8
>         Environment: WebSphere Liberty Server 8.5.5.8, MyFaces 2.2
>            Reporter: Hank Ibell
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 2.2.10
>
>         Attachments: FacesFlowTest1.war, myfaces-4038.patch
>
>
> According to section 7.4.2.3 'Requirements for Exiting a Flow' of the JSF 2.2 specification,
a flow's finalizer (if any) should be called before deactivating any FlowScoped beans for
the flow.
> {panel:bgColor=#e8e8e8|title=7.4.2.3 Requirements for Exiting a Flow}
> If any of the preceding navigation steps cause a flow to be exited, the implementation
must perform the following steps, in this order, before continuing with navigation.
> - Call the finalizer for the flow, if any.
> - De-activate any @FlowScoped beans for the current flow.
> - If exiting via a return node ensure the return parameters are correctly passed back
to the caller.
> {panel}
> The output from MyFaces 2.2.8 on WebSphere Liberty demonstrates the issue:
> {panel}
> [3/16/16 0:14:34:698 EDT] 00000089 SystemOut     O FacesFlowTest1: FlowBean created
> [3/16/16 0:14:34:699 EDT] 00000089 SystemOut     O FacesFlowTest1: Flow initialized
> [3/16/16 0:14:39:439 EDT] 00000089 SystemOut     O FacesFlowTest1: FlowBean destroyed
> [3/16/16 0:14:39:440 EDT] 00000089 SystemOut     O FacesFlowTest1: Flow finalized
> {panel}
> I tested on WildFly with Mojarra and it is behaving according to the specification:
> {panel}
> 00:12:40,543 INFO  [stdout] (default task-6) FacesFlowTest1: FlowBean created
> 00:12:40,544 INFO  [stdout] (default task-6) FacesFlowTest1: Flow initialized
> 00:12:44,954 INFO  [stdout] (default task-8) FacesFlowTest1: Flow finalized
> 00:12:44,955 INFO  [stdout] (default task-8) FacesFlowTest1: FlowBean destroyed
> {panel}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message