<p dir="ltr">Guess we reach the point we say the same thing differently so let switch to how we get this new API in the final version?<br>
</p>
<div class="gmail_quote">Le 19 juin 2015 17:31, &quot;Mark Struberg&quot; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, CdiCtrl is on the way. The missing part is ContextControl. But we need to find a better solution as I’m not yet perfectly happy with what we have in DeltaSpike. That is also the reason why it’s not yet in EDR1. But I agree that it surely should be in the Final CDI-2.0 release!<br>
That doesn’t change the fact that the RequestContext should be available by default. At least for now (where we have no ContextCtrl).<br>
<br>
LieGrue,<br>
strub<br>
<br>
<br>
&gt; Am 19.06.2015 um 18:26 schrieb Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>&gt;:<br>
&gt;<br>
&gt; @Mark: said shortly cdictrl should go in the spec. Allowing to write an request scoped executor service should be possible for frameworks<br>
&gt;<br>
&gt; Le 19 juin 2015 17:21, &quot;Mark Struberg&quot; &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a écrit :<br>
&gt; Romain, I think I totally lost you. Which part of it is not portable? Do you have any example?<br>
&gt;<br>
&gt; LieGrue,<br>
&gt; strub<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &gt; Am 19.06.2015 um 14:59 schrieb Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>&gt;:<br>
&gt; &gt;<br>
&gt; &gt; Looks like you miss the main point. The usage is not portable most of the time. Cant we make it portable?<br>
&gt; &gt;<br>
&gt; &gt; Le 19 juin 2015 13:57, &quot;Jozef Hartinger&quot; &lt;<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt; a écrit :<br>
&gt; &gt; I agree with Martin and Mark. @RequestScoped already is used as a<br>
&gt; &gt; general purpose task-bound scope. This covers, but is not limited to,<br>
&gt; &gt; HTTP request. On the other hand @SessionScoped and @ConversationScoped<br>
&gt; &gt; are only defined to be available for HTTP requests.<br>
&gt; &gt;<br>
&gt; &gt; On 06/19/2015 08:43 AM, Antoine Sabot-Durand wrote:<br>
&gt; &gt; &gt; Jozef, Martin,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; What is your POV on that ?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Antoine<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;&gt; Le 18 juin 2015 à 20:37, Mark Struberg &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a écrit :<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; 1.) The whole point is that @RequestScoped is NOT a web context!<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; Otherwise it would _not_ be active in JMS etc…<br>
&gt; &gt; &gt;&gt; And that was not an accident but intentional.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; 2.) And no, different async threads will _never_ get the same request context…<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; 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?<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; LieGrue,<br>
&gt; &gt; &gt;&gt; strub<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; Am 18.06.2015 um 15:13 schrieb Romain Manni-Bucau &lt;<a href="mailto:rmannibucau@gmail.com">rmannibucau@gmail.com</a>&gt;:<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; Hi<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; I wouldn&#39;t activate any &quot;web&quot; 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.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; 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 &quot;batches&quot;, &quot;timers&quot; etc easy to impl/integrate.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; Romain Manni-Bucau<br>
&gt; &gt; &gt;&gt;&gt; @rmannibucau |  Blog | Github | LinkedIn | Tomitriber<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; 2015-06-18 15:10 GMT+02:00 Antoine Sabot-Durand &lt;<a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a>&gt;:<br>
&gt; &gt; &gt;&gt;&gt; Hi guys,<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; We should finally decide how to manage normal scope context (other than application context ) in SE and during Async Event for EDR1.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; 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.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; 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.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; What is you feeling about this ?<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; Antoine<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; _______________________________________________<br>
&gt; &gt; &gt;&gt;&gt; cdi-dev mailing list<br>
&gt; &gt; &gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt; &gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; _______________________________________________<br>
&gt; &gt; &gt;&gt;&gt; cdi-dev mailing list<br>
&gt; &gt; &gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt; &gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; _______________________________________________<br>
&gt; &gt; &gt;&gt; cdi-dev mailing list<br>
&gt; &gt; &gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; cdi-dev mailing list<br>
&gt; &gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;<br>
&gt; &gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; cdi-dev mailing list<br>
&gt; &gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;<br>
&gt; &gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
&gt;<br>
<br>
</blockquote></div>