I'd start by pointing you to CDI TCK as that's a good starting point to see
For your question, that would be this test -
And possibly few more in the same test class.
As for the linked classes - your `ConversationBean` is listening for @Initialized event.
Can you verify that a new conversation was activated for your request instead of verifying
that context was activated?
E.g. check IDs or something along those lines? I suppose that will hold true and in that
case it works just as spec requires it to.
From the top of my head I don't really know how we
activate/deactivate ConversationContext, I'd need to dig that up, but looking at CDI
spec, it doesn't mandate that it is activated every time again and it could already be
active for given request.
Plus from just the classes you linked, I cannot know if
you test this with no existing conversation or maybe with some long running one before you
try to send a request for non-existing one...and so on.
So if the above doesn't is not enough to answer your question, then we're going to
need a complete reproducer so that we both talk about the same scenario :)
----- Original Message -----
From: "Benjamin Confino" <BENJAMIC(a)uk.ibm.com>
Cc: "Takayuki T Ishii" <EBB0F3L(a)jp.ibm.com>
Sent: Monday, January 27, 2020 11:42:14 AM
Subject: [weld-dev] Question about conversations scope initilization obeserver
I have a customer who's sent me a sample application, I have attached the
source to it below.
When the customer visits index.xhtml they see the following output:
Conversation begun. cid:1 , timeout:3600000
Conversation destroyed. cid:1
However when they append "?cdi=" or a non-existnant identifier like
"?cdi=10000" to the url they do not see "Conversation initialized."
The CDI spec says that: If the propagated conversation cannot be restored,
the container must associate the request with a new transient conversation
and throw an exception of type
I'm wondering if this should apply here? Or would it only apply if the cid
pointed to an existing conversation that could not be restored? And is there
anything in the spec that covers this specific situation?
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
weld-dev mailing list