CDI Talk Distribution: Transitional and Long

From the Weld CDI documentation:

The conversation context is automatically propagated with any request to the JSF face (submitting the JSF form) or redirection. It is not automatically distributed with third-party requests, for example, using a link.

I was wondering if the context is propagated through a JSF request for transient conversations? And more generally, is there any kind of concretization of the differences in distribution regarding transitional and lengthy conversations?

Assuming the answer to the first question is yes, can you provide a use case when you need a long conversation?

+4
source share
1 answer

From the same document:

The conversation context is active during any JSF request. Most conversations are destroyed at the end of the request. If a conversation should contain a state for several requests, it should be clearly moving towards a long conversation.

If the conversation is temporary (never progressed to a long action), its life cycle is associated with the request.

... Assuming the answer to the first question is yes ...

This is a no :)

... can you provide a precedent when a lengthy conversation is required? ...

All tasks ("units of work") that span more than one request.

Hope this is clear now, feel free to ask additional questions.

+7
source

All Articles