Search code examples
javajsf-2java-ee-6cdi

Is the conversation scope leaky?


I know how to use @ConversationScoped in a wizard consisting of multiple pages. I was wondering, though, what happens when users abort the wizard by navigating somewhere completely unrelated? How can the container figure out the conversation has ended when the conversation scope doesn't seem to be tied to any JSF view states?

If the conversation scope is indeed leaky, what are some good strategies for mitigating this problem?


Solution

  • Conversations time out if not used for a certain amount of time. The default timeout value set by the container can be modified on a single conversation instance by mean of this API: Conversation.setTimeout()