<div dir="ltr">Jozef,<div><br></div><div>I think I really got your disagreement on that point. You repeated it many times.</div><div><br></div><div>My point and the question I keep asking to you is &quot;what is your suggestion?&quot;.</div><div>Personally I see 5 solutions here:</div><div><br></div><div>1) Don&#39;t do anything since there&#39;s no alternative solution</div><div>2) Change the wording regarding request scope activation in something like &quot;is active from the initialization of the container until its shutdown&quot;</div><div>3) Give the same behavior than application scope request scope is shared</div><div>4) Revert and say that Request Scope is not active in SE. But it&#39;s also a hack since we&#39;ll change it with CDI-530</div><div>5) Don&#39;t specify anything</div><div><br></div><div>I guess that you&#39;re choice is 4 or 5, but I may be wrong again, so why not tell us what you&#39;d like to see and save us some time ?</div><div><br></div><div>thanks</div><div><br></div><div>Antoine </div><div><span style="line-height:1.5;font-size:13.1999998092651px"> </span><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le mer. 24 juin 2015 à 11:13, Mark Struberg &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jozef, read the rest of the meeting minutes as well. Throne and I enlisted dozen of REAL use cases where it is needed.<br>
<br>
&gt; Does the @RequestScoped hack really address customers&#39; problem?<br>
Yes it does. In the final spec a programmer could programmatically enable the request context and ends it again IF he needs it. But today he cannot. And many users code really needs it. So the only thing we can do TODAY is to enable it by default.<br>
<br>
&gt; * A CDI implementation may add such hack by itself - no need to have it<br>
&gt; the spec temporarily<br>
Well that is an option but the users then cannot rely on it.<br>
<br>
<br>
And no, it is perfectly implementable as it is worded right now.<br>
<br>
LieGrue,<br>
strub<br>
<br>
<br>
&gt; Am 24.06.2015 um 10:50 schrieb Jozef Hartinger &lt;<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>&gt;:<br>
&gt;<br>
&gt; Hi all,<br>
&gt;<br>
&gt; unfortunately I did not make it to the meeting yesterday. After reading<br>
&gt; the transcript I found out that the @RequestScoped hack is still being<br>
&gt; added to the EDR. What do I mean by &quot;@RequestScoped hack&quot;?<br>
&gt; By that I am referring to the following part of the spec:<br>
&gt;<br>
&gt; &quot;<br>
&gt; In Java SE:<br>
&gt; The request scope is active during any method invocation.<br>
&gt; The request context is destroyed when the container is shut down.<br>
&gt; &quot;<br>
&gt;<br>
&gt; This is vague, almost undefined and not correctly implementable. Most<br>
&gt; importantly, everyone seems to agree that it would be a bad idea for<br>
&gt; this to end up in the final spec. Instead, it is supposed to be replaced<br>
&gt; entirely by ContextControl API (<a href="https://issues.jboss.org/browse/CDI-530" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/CDI-530</a>)<br>
&gt; post EDR1.<br>
&gt;<br>
&gt; Yet, we are adding this hack to EDR1 for the meantime. Why? The only<br>
&gt; argument to back this was &quot;supporting existing libraries and applications&quot;.<br>
&gt;<br>
&gt; That seems reasonable, doesn&#39;t it? Well, no. Antoine took a detailed<br>
&gt; look into probably the most prominent CDI library - DeltaSpike. Yes, you<br>
&gt; can find @RequestScoped beans in DeltaSpike. You can find Servlet<br>
&gt; artifact producers, JSF view root and navigation handlers, etc. And<br>
&gt; that&#39;s it. Nothing one could really use outside of the EE stack.<br>
&gt;<br>
&gt; That&#39;s not a coincidence. When a user marks a bean as @RequestScoped we<br>
&gt; can assume they do it for a reason. The reason most likely would be to<br>
&gt; scope the state per &quot;task&quot; (often HTTP request processing) and isolate<br>
&gt; the state from the state of other tasks. That&#39;s very different from the<br>
&gt; @Singleton-like behavior that the @RequestScoped hack adds. Therefore,<br>
&gt; even if a library exists that relies on @RequestScoped it is not going<br>
&gt; to work properly anyway. The @RequestScoped hack just suppresses a fast<br>
&gt; failure and trades it for weird state inconsistencies later.<br>
&gt;<br>
&gt; Another part of the argument is &quot;existing applications&quot;. More specifically:<br>
&gt;<br>
&gt; &quot;struberg: well, I have a few customers with 10k++ classes. And some<br>
&gt; core components use it heavily&quot;<br>
&gt;<br>
&gt; Does the @RequestScoped hack really address customers&#39; problem? Remember<br>
&gt; that the @RequestScoped hack is planned to be temporary and replaced<br>
&gt; with proper context control post EDR1.<br>
&gt; Are those customers planning to migrate to EDR1 implementation (Weld<br>
&gt; Alpha probably) before the spec gets context control? Do they expect to<br>
&gt; take their &quot;10k++ class&quot; Java EE applications, throw the EE container<br>
&gt; out entirely and run the *unmodified* application in a plain Java SE<br>
&gt; environment with CDI SE? Will their apps work even if their<br>
&gt; @RequestScoped beans start behaving like singletons?<br>
&gt; Probably not, right?<br>
&gt;<br>
&gt; And then we have early adopters of CDI 2.0. Why should they be exposed<br>
&gt; to magical hacks that we know are going to disappear later?<br>
&gt;<br>
&gt; And let&#39;s not forget that:<br>
&gt; * CDI implementations already have their own APIs for controlling<br>
&gt; contexts that can be used if needed<br>
&gt; * A CDI implementation may add such hack by itself - no need to have it<br>
&gt; the spec temporarily<br>
&gt;<br>
&gt; Therefore, I cannot see a single reason for polluting the spec with<br>
&gt; temporary hacks.<br>
&gt;<br>
&gt; Jozef<br>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
&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;<br>
&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>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br>
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>
</blockquote></div>