You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2016/03/18 00:18:33 UTC
[jira] [Comment Edited] (MYFACES-4038) Flow beans are destroyed
before flow is finalized
[ https://issues.apache.org/jira/browse/MYFACES-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15200605#comment-15200605 ]
Leonardo Uribe edited comment on MYFACES-4038 at 3/17/16 11:17 PM:
-------------------------------------------------------------------
The issue is valid. The finalizer must be called when the flow is still active but before @PreDestroy is called. Thanks to Hank Ibell for provide this patch
was (Author: lu4242):
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)