Le 18 juin 2015 20:37, "Mark Struberg" <struberg@yahoo.de> a écrit :
>
> 1.) The whole point is that @RequestScoped is NOT a web context!
>
> Otherwise it would _not_ be active in JMS etc…
> And that was not an accident but intentional.
>

Excepted it is highly bound to web (events, lifecycle etc...). Ejb integ is weak and could have been  ignored - just my opinion on this last part, dont want a thread on this.

> 2.) And no, different async threads will _never_ get the same request context…
>

Start to use it and you ll miss it - or u missed my point.

>
> 3.) no @RequestScoped is a sub-part of a @ThreadScoped. Otherwise you would get the same context for 2 JMS invocations which get (randomly) executed on the same worker thread. Got me?
>

ThreadScoped  =TaskScope for an executor service.

The whole point is while you cant use it urself - without DS - it is not a threadscope. Is it clearer?

>
> LieGrue,
> strub
>
>
> > Am 18.06.2015 um 15:13 schrieb Romain Manni-Bucau <rmannibucau@gmail.com>:
> >
> > Hi
> >
> > I wouldn't activate any "web" scope by default, in particular for async events where I think most of the time it will not be used. Next feature request will be to inherit the scope between async threads....and here I guess we agree it will not go very far.
> >
> > Side note: using request scope where actually a thread scope is needed is a pain, maybe time to add a thread scoped with an accessible manual activation. Would make "batches", "timers" etc easy to impl/integrate.
> >
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >
> > 2015-06-18 15:10 GMT+02:00 Antoine Sabot-Durand <antoine@sabot-durand.net>:
> > Hi guys,
> >
> > We should finally decide how to manage normal scope context (other than application context ) in SE and during Async Event for EDR1.
> >
> > Having only RequestContext active during async event  as Martin suggest in the PR makes sense and would be consistent with its behavior during async EJB call.
> >
> > Mark asked twice to activate Request Context all the time in SE (making it a new Application Context). I’m not found of it, but I’ml not the only one to decide here.
> >
> > What is you feeling about this ?
> >
> > Antoine
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
> > Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>