I think the current spec wording already defines what happens in that case. At least there
are TCK tests for it.
LieGrue,
strub
On Sunday, 20 March 2016, 21:37, arjan tijms <arjan.tijms(a)gmail.com> wrote:
On Sun, Mar 20, 2016 at 6:36 PM, Manfred Riem <mnriem(a)gmail.com> wrote:
Why is changing @RequestScoped out of the question?
>
>
>From my perspective when an AsyncContext is started the request is still there.
>
>
>It is just being served by a different thread.
With just AsyncContext the original request thread can end and a new thread can write to
the response. Both of them can access the request object after the AsyncContext has been
handed to the second thread. But the second thread is not necessarily
"connected" to anything, is it? It's just any random thread that gets the
AsyncContext object passed in.
Would it work here if there was a public CDI API available to activate the request scope
(and session scope possibly) from a given instance of ServletRequest?
Regardless, this is a slightly different problem from when a given request thread submits
work to a Concurrency spec executor.
Kind regards,
Arjan Tijms