<div dir="ltr">Hi All,<div><br></div><div>Ed burns (in cc) contacted me yesterday to follow our brief encounter at Java One to re-open SERVLET_SPEC-116  (CDI-492 on our side).</div><div><br></div><div>As you can see in the discussion below, I gave some leads to solve their issues and suggested that we help them to work on them.</div><div><br></div><div>Perhaps we could start by setting up an online meeting with all interested person on both EG?</div><div><br></div><div>Antoine</div><div><div class="gmail_quote"><div dir="ltr" class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">---------- Forwarded message ----------<br class="gmail_msg">From: <b class="gmail_sendername gmail_msg">Antoine Sabot-Durand</b> <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:asd@redhat.com" class="gmail_msg" target="_blank">asd@redhat.com</a>&gt;</span><br class="gmail_msg">Date: Wed, Oct 12, 2016 at 10:22 AM<br class="gmail_msg">Subject: Re: [SERVLET_SPEC-116-CDIRelatedBeansInServletSpec][CDI-492-FobStuffToServlet] Revitalization attempt<br class="gmail_msg">To: Edward Burns &lt;<a href="mailto:edward.burns@oracle.com" class="gmail_msg" target="_blank">edward.burns@oracle.com</a>&gt;<br class="gmail_msg">Cc: Shing Wai Chan &lt;<a href="mailto:shing.wai.chan@oracle.com" class="gmail_msg" target="_blank">shing.wai.chan@oracle.com</a>&gt;<br class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"><div dir="ltr" class="gmail_msg">Hi Ed,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Glad to ear that. as you can check on our side [1] we are ready to help you solve these point</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Solutions are reachable:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">For the backward compatibility issue raised by Stuart:</div><div class="gmail_msg">As I already said, the backward compatibility could be solved by either a qualifier or by adding to CDI an easy way to detect its version and decide of the bean creation on servlet side according to it.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">For the portable implementation issue:</div><div class="gmail_msg">I don&#39;t understand what is the problem here. CDI provide a powerful SPI that allows development of portable extensions. Unless I miss something, I see no reason why this code shouldn&#39;t be developed at the spec level and so being portable. BTW we are of course ready to help you right this code.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">For the class loading issue:</div><div class="gmail_msg">2 solutions here:</div><div class="gmail_msg">- accept to have an inactive class in your implementation (a CDI portable extension) linked to a missing library (cdi-api). As it will never be called no error should be raised</div><div class="gmail_msg">- do like JAX-RS by creating a specific jar for CDI support in your implementation. The jar would be included in Java EE and not in Servlet only server  </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">That&#39;s only from my understanding and knowledge of the problem, if we go to a discussion with all CDI EG, we may find even more better solutions.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I suggest that start a workgroup including member of the EG on both side to work on this issues resolution</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Wdyt?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Antoine</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">[1] <a href="http://cdi-development-mailing-list.1064426.n5.nabble.com/Which-version-of-HttpServletRequest-is-injected-td5713578.html#a5713688" class="gmail_msg" target="_blank">http://cdi-development-mailing-list.1064426.n5.nabble.com/Which-version-of-HttpServletRequest-is-injected-td5713578.html#a5713688</a></div></div><div class="m_-5243104013373717103HOEnZb gmail_msg"><div class="m_-5243104013373717103h5 gmail_msg"><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Tue, Oct 11, 2016 at 5:26 PM, Edward Burns <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:edward.burns@oracle.com" class="gmail_msg" target="_blank">edward.burns@oracle.com</a>&gt;</span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Antoine,<br class="gmail_msg"><br><br class="gmail_msg"><br>When I briefly bumped into you at JavaOne, you expressed a desire to<br class="gmail_msg"><br>revisit this issue.  Since we didn&#39;t make time to meet at JavaOne, I am<br class="gmail_msg"><br>following up over email.<br class="gmail_msg"><br><br class="gmail_msg"><br>Way back at the beginning of Servlet 4.0, I attempted to get this one<br class="gmail_msg"><br>resolved.  We filed two JIRAS, as in the subject, and had some<br class="gmail_msg"><br>discussion [1] [2].  We ended up resolving SERVLET_SPEC_116 as<br class="gmail_msg"><br>WORKS_AS_DESIGNED for this reason, the &quot;classloader and backward<br class="gmail_msg"><br>compatibility concern&quot;:<br class="gmail_msg"><br><br class="gmail_msg"><br>&gt;&gt;&gt;&gt;&gt; On Wed, 19 Nov 2014 15:55:43 -0500 (EST), Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com" class="gmail_msg" target="_blank">sdouglas@redhat.com</a>&gt; said:<br class="gmail_msg"><br><br class="gmail_msg"><br>SD&gt; Say I have an application that packages Weld (or OWB) that I have<br class="gmail_msg"><br>SD&gt; deployed on a Servlet 3.1 container, and I now want to move it to a<br class="gmail_msg"><br>SD&gt; Servlet 4.0 container. The older version of Weld will still provide<br class="gmail_msg"><br>SD&gt; the HttpServletRequest beans (as it is required to do by spec) and<br class="gmail_msg"><br>SD&gt; the servlet container will also provide these beans (as we are<br class="gmail_msg"><br>SD&gt; required to do by spec) and as a result if you try and inject them<br class="gmail_msg"><br>SD&gt; you will get a bean resolution error as two beans resolve to the<br class="gmail_msg"><br>SD&gt; injection point.<br class="gmail_msg"><br><br class="gmail_msg"><br>&gt;&gt;&gt;&gt;&gt; On Fri, 21 Nov 2014 14:06:24 +1100, Greg Wilkins &lt;<a href="mailto:gregw@intalio.com" class="gmail_msg" target="_blank">gregw@intalio.com</a>&gt; said:<br class="gmail_msg"><br><br class="gmail_msg"><br>GW&gt; While initially I thought that the words &quot;when running in an<br class="gmail_msg"><br>GW&gt; environment that also supports CDI...&quot; would be sufficient to make<br class="gmail_msg"><br>GW&gt; this OK, I&#39;m now doubting that.  I share Stuarts concerns about<br class="gmail_msg"><br>GW&gt; classloading confusion.<br class="gmail_msg"><br><br class="gmail_msg"><br>&gt;&gt;&gt;&gt;&gt; On Fri, 21 Nov 2014 07:03:33 -0800, Edward Burns &lt;<a href="mailto:edward.burns@oracle.com" class="gmail_msg" target="_blank">edward.burns@oracle.com</a>&gt; said:<br class="gmail_msg"><br><br class="gmail_msg"><br>EB&gt; Ajran, while your observations are accurate, the backward<br class="gmail_msg"><br>EB&gt; compatibility issues raised by Stuart and seconded by Greg are<br class="gmail_msg"><br>EB&gt; showstoppers for this change in my opinion at this point.<br class="gmail_msg"><br><br class="gmail_msg"><br>There was an additional concern, the &quot;portable implementation concern&quot;:<br class="gmail_msg"><br>it is not possible to provide portable implementations of the code<br class="gmail_msg"><br>necessary to implement the new requirements that would be in the Servlet<br class="gmail_msg"><br>spec, taken from CDI section 3.8:<br class="gmail_msg"><br><br class="gmail_msg"><br>CDI3.8&gt;    A servlet container must provide the following built-in<br class="gmail_msg"><br>CDI3.8&gt;    beans, all of which have qualifier @Default:<br class="gmail_msg"><br><br class="gmail_msg"><br>CDI3.8&gt;    a bean with bean type javax.servlet.http.HttpServletRequest,<br class="gmail_msg"><br>CDI3.8&gt;    allowing injection of a reference to the HttpServletRequest<br class="gmail_msg"><br><br class="gmail_msg"><br>CDI3.8&gt;    a bean with bean type javax.servlet.http.HttpSession,<br class="gmail_msg"><br>CDI3.8&gt;    allowing injection of a reference to the HttpSession,<br class="gmail_msg"><br><br class="gmail_msg"><br>CDI3.8&gt;    a bean with bean type javax.servlet.ServletContext, allowing<br class="gmail_msg"><br>CDI3.8&gt;    injection of a reference to the ServletContext,<br class="gmail_msg"><br><br class="gmail_msg"><br>CDI3.8&gt;    These beans are passivation capable dependencies, as defined<br class="gmail_msg"><br>CDI3.8&gt;    in Passivation capable dependencies.<br class="gmail_msg"><br><br class="gmail_msg"><br>In my understanding, the portable implementation concern has been adequately<br class="gmail_msg"><br>addressed by API in CDI 2.0.  Is that correct?<br class="gmail_msg"><br><br class="gmail_msg"><br>Do you have any suggestion for how to address the classloader and<br class="gmail_msg"><br>backward compatibility concern?<br class="gmail_msg"><br><br class="gmail_msg"><br>Thanks,<br class="gmail_msg"><br><br class="gmail_msg"><br>Ed</blockquote></div></div></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="m_-5243104013373717103HOEnZb gmail_msg"><div class="m_-5243104013373717103h5 gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg"><br><span class="m_-5243104013373717103m_-6867832000070307503HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><br class="gmail_msg"><br>--<br class="gmail_msg"><br>| <a href="mailto:edward.burns@oracle.com" class="gmail_msg" target="_blank">edward.burns@oracle.com</a> | office: <a href="tel:%2B1%20407%20458%200017" value="+14074580017" class="gmail_msg" target="_blank">+1 407 458 0017</a><br class="gmail_msg"><br><br class="gmail_msg"><br><br class="gmail_msg"><br><br class="gmail_msg"><br>[1] <a href="https://java.net/projects/servlet-spec/lists/jsr369-experts/archive/2014-11/message/1" rel="noreferrer" class="gmail_msg" target="_blank">https://java.net/projects/servlet-spec/lists/jsr369-experts/archive/2014-11/message/1</a><br class="gmail_msg"><br><br class="gmail_msg"><br>[2] <a href="https://java.net/projects/servlet-spec/lists/users/archive/2014-11/message/26" rel="noreferrer" class="gmail_msg" target="_blank">https://java.net/projects/servlet-spec/lists/users/archive/2014-11/message/26</a><br class="gmail_msg"><br></font></span></blockquote></div></div></div></div></div></div></div></div></div>