[weld-dev] Reattach to conversation

Matej Novotny manovotn at redhat.com
Mon Aug 13 03:22:00 EDT 2018


Hi James,

a conversation is identified by its ID and if it is already active, you should be adding the 'cid' parameter with proper value to your requests[1].
This of course requires the conversation to be long-running which I assume you have.

Is this what you meant?

Matej

________________________________________________________________________________________________
[1]http://docs.jboss.org/weld/reference/latest-master/en-US/html_single/#_the_conversation_scope


----- Original Message -----
> From: "James ." <cube_00 at hotmail.com>
> To: weld-dev at lists.jboss.org
> Sent: Sunday, August 12, 2018 8:53:05 AM
> Subject: [weld-dev] Reattach to conversation
> 
> I want to join an existing conversation scope.
> 
>  I start the conversation with:
> 
>  conversation.begin(packageId);
> 
> I got close with using the following which seems to work:
> 
>  @Inject @Http CoversationContext context;
> 
> context.activate(packageId);
> 
> However I'm seeing a warning in the log which suggests I'm not getting it
> right.
> 
> WARN: WELD-000335: Conversation context is already active, most likely it was
> not cleaned up properly during previous request processing:
> HttpServletRequestImpl [ POST /path/to/url ]
> 
> I'm also happy if there is an alternative way to just drop the conversation
> and recreate (so long as I can continue using the same custom conversation
> ID) I'm trying to avoid the user reloading the page multiple times filling
> up memory with duplicates of the same package data.
> 
> I also considered using a @SessionScoped bean but I thought if I can set the
> package ID to be the conversation ID then I can avoid the need to manage a
> @SessionScoped bean.
> 
> 
> 
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
> 



More information about the weld-dev mailing list