If we plan to release an impl for edr1 we have to decide its behavior IMO. But I agree with you, it shouldn&#39;t take this time to do it. <br><div class="gmail_quote">Le mar. 23 juin 2015 à 08:28, Jozef Hartinger &lt;<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt; a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Given that we plan on adding ContextControl to the spec, which deals<br>
with this much better, why even bother figuring out and specifying a<br>
temporary solution for the meantime?<br>
<br>
On 06/23/2015 07:20 AM, Mark Struberg wrote:<br>
&gt; +1. Imo this is the best we can do until we have a proper ContextControl in place. Otherwise many users would not be able to reuse existing libs in SE.<br>
&gt;<br>
&gt; LieGrue,<br>
&gt; strub<br>
&gt;<br>
&gt;&gt; Am 22.06.2015 um 14:52 schrieb Antoine Sabot-Durand &lt;<a href="mailto:antoine@sabot-durand.net" target="_blank">antoine@sabot-durand.net</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt; Sorry Martin, I don&#39;t agree<br>
&gt;&gt;<br>
&gt;&gt; For me there are 2 scenarios for EDR1 :<br>
&gt;&gt;<br>
&gt;&gt; 1) Request context is never active in SE (the one I started with).<br>
&gt;&gt; 2) Request context is always active to provide a behavior similar than Java EE. Yes that probably mean that Request context will be like another application context.<br>
&gt;&gt;<br>
&gt;&gt; Having something in the middle, even if it could make sense at the sec level would be totality puzzling from users POV (why I have a request context in an async event and not in a sync ? why in a postconstruct and when I use my bean later).<br>
&gt;&gt;<br>
&gt;&gt; Again that wouldn&#39;t be the final behavior since we should work on CDI-530 but it could ease  the work review of the community.<br>
&gt;&gt;<br>
&gt;&gt; Personally I think that we should go for 1) only if we are sure that CDI-530 won&#39;t give possibility to user to have an active request context which I hope won&#39;t be the case.<br>
&gt;&gt;<br>
&gt;&gt; Antoine<br>
&gt;&gt;<br>
&gt;&gt; Le lun. 22 juin 2015 à 13:27, Martin Kouba &lt;<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a>&gt; a écrit :<br>
&gt;&gt; Dne 22.6.2015 v 13:15 Antoine Sabot-Durand napsal(a):<br>
&gt;&gt;&gt; &quot;Should be active&quot;. It was one of the subject of this email<br>
&gt;&gt; To make it clear - the request context will not be active all the<br>
&gt;&gt; time... I mean it makes sense to have it active during @PostConstruct<br>
&gt;&gt; invocation and async delivery. Or in case of an emebedded servlet<br>
&gt;&gt; container running as a part of a CDI SE app (something like DropWizard),<br>
&gt;&gt; during servlet requests processing. But not all the time like<br>
&gt;&gt; application context is...<br>
&gt;&gt;<br>
&gt;&gt;&gt; Le lun. 22 juin 2015 à 12:48, Jozef Hartinger &lt;<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a><br>
&gt;&gt;&gt; &lt;mailto:<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>&gt;&gt; a écrit :<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;      What does &quot;Requestcontext should be up in Java SE&quot; mean exactly?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;      On 06/22/2015 11:26 AM, Antoine Sabot-Durand wrote:<br>
&gt;&gt;&gt;&gt;      To synthetize:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;      - Requestcontext will be active during async events<br>
&gt;&gt;&gt;&gt;      - To be consistent, Requestcontext should be up in Java SE<br>
&gt;&gt;&gt;&gt;      - Other HTTP context (eception application) will be inactive<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;      This will clarified later, with context control ticket CDI-530<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;      I produce the EDR1 today and go back to you.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;      Antoine<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;      Le sam. 20 juin 2015 à 22:26, Mark Struberg &lt;<a href="mailto:struberg@yahoo.de" target="_blank">struberg@yahoo.de</a><br>
&gt;&gt;&gt;&gt;      &lt;mailto:<a href="mailto:struberg@yahoo.de" target="_blank">struberg@yahoo.de</a>&gt;&gt; a écrit :<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;          The Request context is not needed by the eventing system<br>
&gt;&gt;&gt;&gt;          itself. But tons of usercode around needs the requestcontext<br>
&gt;&gt;&gt;&gt;          to be set up and active. This is the default for almost every<br>
&gt;&gt;&gt;&gt;          spec definedmanaged bean invocation. So we should rather not<br>
&gt;&gt;&gt;&gt;          change this for async events neither. If we change this then<br>
&gt;&gt;&gt;&gt;          you could not reuse lots of existing code in your new async<br>
&gt;&gt;&gt;&gt;          observer.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;          The lifecycle is rather easy to define: it starts shortly<br>
&gt;&gt;&gt;&gt;          before the async method (including<br>
&gt;&gt;&gt;&gt;          interceptors/decorators/etc) gets started and ends afterwards.<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;          &gt; Am 20.06.2015 um 00:51 schrieb Anatole Tresch<br>
&gt;&gt;&gt;&gt;          &lt;<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a> &lt;mailto:<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a>&gt;&gt;:<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt; Hi all,<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt; for me the question is: do we need a RequestContext? We have<br>
&gt;&gt;&gt;&gt;          the Event payload, which is shared (and AFAIK also still<br>
&gt;&gt;&gt;&gt;          mutable) and can be used to represent the common context as<br>
&gt;&gt;&gt;&gt;          well, for both synch or asynch event cases. Adding a parallel<br>
&gt;&gt;&gt;&gt;          &quot;context&quot; does not necessarily make things easier IMO, because<br>
&gt;&gt;&gt;&gt;          you have to exactly define what a request in that sense is,<br>
&gt;&gt;&gt;&gt;          when does it start, where does it end, how it is<br>
&gt;&gt;&gt;&gt;          propagated/stacked etc. So my question is: what is the benefit<br>
&gt;&gt;&gt;&gt;          of defining the request scope additional to the event payload<br>
&gt;&gt;&gt;&gt;          already in place?<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt; Anatole<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt; 2015-06-18 15:10 GMT+02:00 Antoine Sabot-Durand<br>
&gt;&gt;&gt;&gt;          &lt;<a href="mailto:antoine@sabot-durand.net" target="_blank">antoine@sabot-durand.net</a> &lt;mailto:<a href="mailto:antoine@sabot-durand.net" target="_blank">antoine@sabot-durand.net</a>&gt;&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<br>
&gt;&gt;&gt;&gt;          (other than application context ) in SE and during Async Event<br>
&gt;&gt;&gt;&gt;          for EDR1.<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt; Having only RequestContext active during async event as<br>
&gt;&gt;&gt;&gt;          Martin suggest in the PR makes sense and would be consistent<br>
&gt;&gt;&gt;&gt;          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<br>
&gt;&gt;&gt;&gt;          SE (making it a new Application Context). I’m not found of it,<br>
&gt;&gt;&gt;&gt;          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" target="_blank">cdi-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<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<br>
&gt;&gt;&gt;&gt;          licenses the code under the Apache License, Version 2<br>
&gt;&gt;&gt;&gt;          (<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<br>
&gt;&gt;&gt;&gt;          other ideas provided on this list, the provider waives all<br>
&gt;&gt;&gt;&gt;          patent and other intellectual property rights inherent in such<br>
&gt;&gt;&gt;&gt;          information.<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt; --<br>
&gt;&gt;&gt;&gt;          &gt; Anatole Tresch<br>
&gt;&gt;&gt;&gt;          &gt; Java Engineer &amp; Architect, JSR Spec Lead<br>
&gt;&gt;&gt;&gt;          &gt; Glärnischweg 10<br>
&gt;&gt;&gt;&gt;          &gt; CH - 8620 Wetzikon<br>
&gt;&gt;&gt;&gt;          &gt;<br>
&gt;&gt;&gt;&gt;          &gt; Switzerland, Europe Zurich, GMT+1<br>
&gt;&gt;&gt;&gt;          &gt; Twitter:  @atsticks<br>
&gt;&gt;&gt;&gt;          &gt; Blogs: <a href="http://javaremarkables.blogspot.ch/" rel="noreferrer" target="_blank">http://javaremarkables.blogspot.ch/</a><br>
&gt;&gt;&gt;&gt;          &gt; Google: atsticks<br>
&gt;&gt;&gt;&gt;          &gt; Mobile  +41-76 344 62 79<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" target="_blank">cdi-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<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<br>
&gt;&gt;&gt;&gt;          licenses the code under the Apache License, Version 2<br>
&gt;&gt;&gt;&gt;          (<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<br>
&gt;&gt;&gt;&gt;          other ideas provided on this list, the provider waives all<br>
&gt;&gt;&gt;&gt;          patent and other intellectual property rights inherent in such<br>
&gt;&gt;&gt;&gt;          information.<br>
&gt;&gt;&gt;&gt;<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" target="_blank">cdi-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<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<br>
&gt;&gt;&gt;&gt;          licenses the code under the Apache License, Version 2<br>
&gt;&gt;&gt;&gt;          (<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<br>
&gt;&gt;&gt;&gt;          other ideas provided on this list, the provider waives all<br>
&gt;&gt;&gt;&gt;          patent and other intellectual property rights inherent in such<br>
&gt;&gt;&gt;&gt;          information.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<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" target="_blank">cdi-dev@lists.jboss.org</a>  &lt;mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<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;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; cdi-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&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;<br>
&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;<br>
&gt;&gt; --<br>
&gt;&gt; Martin Kouba<br>
&gt;&gt; Software Engineer<br>
&gt;&gt; Red Hat, Czech Republic<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; cdi-dev mailing list<br>
&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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>
<br>
</blockquote></div>