Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between JSF FlowScoped and CDI ConversationScoped

What are the differences between javax.faces.flow.FlowScoped and javax.enterprise.context.ConversationScoped beans and when should either be used in application? Becouse as far as I'm concerned they are somehow similar, but I can not figure it out by the material I found on the Internet?

like image 562
Fuv Avatar asked Nov 17 '14 19:11

Fuv


1 Answers

A flow is a group of views related by navigation rules. Flow-scoped beans stay alive as long as you navigate within this flow, and they die when you leave the flow.

Conversation-scoped beans can also survive navigation, but their lifetime is delimited programmatically by calling Conversation.begin() and Conversation.end(). They are not directly related to a specific group of views.

You can use conversation scoped beans without using JSF.

like image 61
Harald Wellmann Avatar answered Oct 16 '22 12:10

Harald Wellmann