Conversations are used to distinguish a set of @ConversationScoped bean instances stored in a particular HTTP session. In other words @ConversationScoped bean instances are bound to a conversation and long-running conversations are scoped to a particular HTTP session.
I know, and I agree.
The point is that it does not make sense to work with a conversation without a @ConversationScoped bean instance.
It might make sense to start a conversation without (yet) a @ConversationScoped bean instance. And, as said previously, this makes sense also from a learning point of view and from a principle of least surprise to the user, as well as from a principle of simplicity. (Here, the user being the developer using CDI.) The user might be a bit surprised to see that the code that starts a conversation suddenly ceases to work because the code that actually uses the conversation has been moved somewhere else. And, I believe that my interpretation is what the spec says anyway.
|