[weld-dev] Question about conversations scope initilization obeserver

Benjamin Confino BENJAMIC at uk.ibm.com
Mon Jan 27 05:42:14 EST 2020


Hello

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 initialized.
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 
javax.enterprise.context.NonexistentConversationException.

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 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20200127/4ee07000/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleFilter.java
Type: application/octet-stream
Size: 769 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/weld-dev/attachments/20200127/4ee07000/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConversationScopedBean.java
Type: application/octet-stream
Size: 284 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/weld-dev/attachments/20200127/4ee07000/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConversationBean.java
Type: application/octet-stream
Size: 1868 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/weld-dev/attachments/20200127/4ee07000/attachment-0002.obj 


More information about the weld-dev mailing list