Hi Olivier, Yes, Weld conversation context is initialized lazily by default.
In fact, the initialization involves two different things: 1. Restoring propagated long-running conversation 2. Initializing the context (and creating the corresponding HTTP session if necessary)
The first part could be done eagerly, see also Lazy and eager conversation context initialization.
However, the second part is not configurable - Weld does not initialize a converstation/session context unless a @ConversationScoped bean is accessed (this is not addressed by the spec, see also
CDI-125
).
In my opinion, this optimization makes sense as it's not useful to create an HTTP session just to store the conversation id.
|