Question

From the Weld CDI documentation:

The conversation context automatically propagates with any JSF faces request (JSF form submission) or redirect. It does not automatically propagate with non-faces requests, for example, navigation via a link.

I was wondering, does the context propagate across JSF faces request for transient conversations as well? And more generally, is there an outline somewhere of the differences regarding propagation between transient and long-running conversations?

Assuming the answer to the first question is 'yes', can you provide a use case where a long running conversation would be required?

Était-ce utile?

La solution

From the very 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 hold state across multiple requests, it must be explicitly promoted to a long-running conversation.

If a conversation is transient (has never been promoted to long-running) its lifecycle is bound to the request.

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

It's "no" :)

... can you provide a use case where a long running conversation would be required? ...

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

I hope it's clear now, feel free to ask further questions.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top