<div dir="ltr">+1 on the definition error Emily suggests. Especially since transient will cause exceptions random hard to reproduce exceptions at runtime. <div><br></div><div>Unproxiable Type due to non private final methods and the like will be encountered as soon as some tries to use it during development. In so far its different, since the transient will only cause a problem when passivatable scopes are deserialized, which is unlikely during development and even if it occurs it will be probably be considered as development glitch. </div><div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">Also in my experience implementation specific warnings and the like cause more confusions then anything else. Also in the context in of the application server the console warnings will be lost in the flood of startup outputs.</span></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 21 Jul 2016 at 11:12 Emily Jiang &lt;<a href="mailto:EMIJIANG@uk.ibm.com">EMIJIANG@uk.ibm.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font size="2" face="sans-serif">As Stephen points out if the &quot;</font><tt><font size="2">when
normal scoped injects are marked transient</font></tt><font size="2" face="sans-serif">&quot;,
it will fail at runtime anyway. I am kind of thinking to throw a definition
error when injection field marks as transient.</font>
<br>
<br><font size="2" face="sans-serif">Many thanks,<br>
Emily<br>
===========================<br>
Emily Jiang<br>
WebSphere Application Server, CDI Development Lead</font>
<br><font size="2" face="sans-serif"> <br>
MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN<br>
Phone:  +44 (0)1962 816278  Internal: 246278<br>
<br>
Email: <a href="mailto:emijiang@uk.ibm.com" target="_blank">emijiang@uk.ibm.com</a> <br></font><font size="2" face="sans-serif">
Lotus Notes: Emily Jiang/UK/IBM@IBMGB<br>
</font>
<br>
<br>
<br>
<br><font size="1" color="#5f5f5f" face="sans-serif">From:      
 </font><font size="1" face="sans-serif">Tomas Remes &lt;<a href="mailto:tremes@redhat.com" target="_blank">tremes@redhat.com</a>&gt;</font>
<br><font size="1" color="#5f5f5f" face="sans-serif">To:      
 </font><font size="1" face="sans-serif">Emily Jiang/UK/IBM@IBMGB,
</font>
<br><font size="1" color="#5f5f5f" face="sans-serif">Cc:      
 </font><font size="1" face="sans-serif"><a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a></font>
<br><font size="1" color="#5f5f5f" face="sans-serif">Date:      
 </font><font size="1" face="sans-serif">21/07/2016 07:13</font>
<br><font size="1" color="#5f5f5f" face="sans-serif">Subject:    
   </font><font size="1" face="sans-serif">Re: [cdi-dev]
CDI-616 Injection point declared as transient is        not
       useful</font>
<br><font size="1" color="#5f5f5f" face="sans-serif">Sent by:    
   </font><font size="1" face="sans-serif"><a href="mailto:cdi-dev-bounces@lists.jboss.org" target="_blank">cdi-dev-bounces@lists.jboss.org</a></font>
<br>

<br>
<br>
<br><tt><font size="2"><br>
As you said. If we introduce definition error for this it won&#39;t be backward
compatible so warning could be sufficient I think and therefore (maybe)
I wouldn&#39;t solve this at specification level but only at implementation
level. That&#39;s my current feeling.<br>
<br>
Tom<br>
<br>
----- Original Message -----<br>
From: &quot;Emily Jiang&quot; &lt;<a href="mailto:EMIJIANG@uk.ibm.com" target="_blank">EMIJIANG@uk.ibm.com</a>&gt;<br>
To: &quot;Martin Kouba&quot; &lt;<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a>&gt;<br>
Cc: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
Sent: Wednesday, July 20, 2016 5:43:59 PM<br>
Subject: Re: [cdi-dev] CDI-616 Injection point declared as transient is
not                
useful<br>
<br>
I prefer to classify a definition error if when normal scoped injects are
marked transient as I agree logging an error or warning are implementation
details. <br>
<br>
I am still struggling to find user case for &quot;non-normal scoped injects
are marked transient&quot;. <br>
<br>
If it is not useful and problematic, why don&#39;t we just declare a Definition
Error if an injection field defined transient? Easy and straightforward.
Thoughts? <br>
<br>
Many thanks, <br>
Emily <br>
=========================== <br>
Emily Jiang <br>
WebSphere Application Server, CDI Development Lead <br>
<br>
MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN <br>
Phone: +44 (0)1962 816278 Internal: 246278 <br>
<br>
Email: <a href="mailto:emijiang@uk.ibm.com" target="_blank">emijiang@uk.ibm.com</a> <br>
Lotus Notes: Emily Jiang/UK/IBM@IBMGB <br>
<br>
<br>
<br>
<br>
From: Martin Kouba &lt;<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a>&gt; <br>
To: <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>, <br>
Date: 20/07/2016 15:38 <br>
Subject: Re: [cdi-dev] CDI-616 Injection point declared as transient is
not useful <br>
Sent by: <a href="mailto:cdi-dev-bounces@lists.jboss.org" target="_blank">cdi-dev-bounces@lists.jboss.org</a> <br>
<br>
<br>
<br>
<br>
Do you suggest to log an ERROR message or to treat it as a definition error?
<br>
<br>
Altough I don&#39;t have any real use case, I&#39;m not so sure this should be
a <br>
definition error. It reminds me unproxyable types with non-private final
<br>
methods (CDI-527) - right now it is a definition error (and I think it&#39;s
<br>
good) but the EG decided to change this, although it could result in <br>
runtime errors (and both Weld and OWB allow to relax this restriction).
<br>
<br>
As to WARNING - the spec currently does not define anything like logging
<br>
or logging levels. IIRC the only mention is in 10.5. Observer notification:
<br>
&quot;If the observer method is a transactional observer method, any <br>
exception is caught and logged by the container.&quot; <br>
<br>
And I believe we should not introduce logging levels in the spec. <br>
<br>
Martin <br>
<br>
Dne 19.7.2016 v 12:52 Stephan Knitelius napsal(a): <br>
&gt; Yes it will cause start up issues for applications which define <br>
&gt; transient normal scoped injections, however these Apps currently have
<br>
&gt; runtime issues after dezieralization of passivatable scoped bean.
<br>
&gt; <br>
&gt; Trading an easily fixable start-up issue for a hard to reproduce runtime
<br>
&gt; issue seems like a good trade off to me. <br>
&gt; <br>
&gt; Stephan <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On Tue, 19 Jul 2016 at 12:12 Emily Jiang &lt;<a href="mailto:EMIJIANG@uk.ibm.com" target="_blank">EMIJIANG@uk.ibm.com</a> <br>
&gt; &lt; </font></tt><a href="mailto:EMIJIANG@uk.ibm.com" target="_blank"><tt><font size="2">mailto:EMIJIANG@uk.ibm.com</font></tt></a><tt><font size="2">
&gt;&gt; wrote: <br>
&gt; <br>
&gt; If we define an error, we will introduce a backward compatibility
<br>
&gt; issue. Some app will stop starting. Will this cause a big problem?
<br>
&gt; If this is not a concern, +1 on defining a DefinitionError on this
<br>
&gt; case: ERROR - when normal scoped injects are marked transient.and
a <br>
&gt; warning on WARNING - when non-normal scoped injects are marked <br>
&gt; transient. <br>
&gt; <br>
&gt; Many thanks, <br>
&gt; Emily <br>
&gt; =========================== <br>
&gt; Emily Jiang <br>
&gt; WebSphere Application Server, CDI Development Lead <br>
&gt; <br>
&gt; MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN <br>
&gt; Phone: +44 (0)1962 816278 Internal: 246278 <br>
&gt; <br>
&gt; Email: <a href="mailto:emijiang@uk.ibm.com" target="_blank">emijiang@uk.ibm.com</a> &lt; </font></tt><a href="mailto:emijiang@uk.ibm.com" target="_blank"><tt><font size="2">mailto:emijiang@uk.ibm.com</font></tt></a><tt><font size="2">
&gt; <br>
&gt; Lotus Notes: Emily Jiang/UK/IBM@IBMGB <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; From: Stephan Knitelius &lt;<a href="mailto:stephan@knitelius.com" target="_blank">stephan@knitelius.com</a> <br>
&gt; &lt; </font></tt><a href="mailto:stephan@knitelius.com" target="_blank"><tt><font size="2">mailto:stephan@knitelius.com</font></tt></a><tt><font size="2">
&gt;&gt; <br>
&gt; To: cdi-dev &lt;<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a> <br>
&gt; &lt; </font></tt><a href="mailto:cdi-dev@lists.jboss.org" target="_blank"><tt><font size="2">mailto:cdi-dev@lists.jboss.org</font></tt></a><tt><font size="2">
&gt;&gt;, <br>
&gt; Date: 19/07/2016 08:26 <br>
&gt; Subject: [cdi-dev] CDI-616 Injection point declared as <br>
&gt; transient is not useful <br>
&gt; Sent by: <a href="mailto:cdi-dev-bounces@lists.jboss.org" target="_blank">cdi-dev-bounces@lists.jboss.org</a> <br>
&gt; &lt; </font></tt><a href="mailto:cdi-dev-bounces@lists.jboss.org" target="_blank"><tt><font size="2">mailto:cdi-dev-bounces@lists.jboss.org</font></tt></a><tt><font size="2">
&gt; <br>
&gt; ------------------------------------------------------------------------
<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; Hi, <br>
&gt; <br>
&gt; I frequently encounter injections marked transient in client <br>
&gt; projects. I really think it would be of great help if we where to
<br>
&gt; define Error/Warning when injection fields are marked transient. <br>
&gt; <br>
&gt; As Mark pointed out there may be a valid use cases for non <br>
&gt; normal-scoped bean injections to be made transient. <br>
&gt; <br>
&gt; My suggestion is: <br>
&gt; <br>
&gt; * ERROR - when normal scoped injects are marked transient. <br>
&gt; <br>
&gt; * <br>
&gt; * WARNING - when non-normal scoped injects are marked transient. <br>
&gt; <br>
&gt; Looking forward to your feedback. <br>
&gt; <br>
&gt; * <br>
&gt; * Stephan_______________________________________________ <br>
&gt; cdi-dev mailing list <br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a> &lt; </font></tt><a href="mailto:cdi-dev@lists.jboss.org" target="_blank"><tt><font size="2">mailto:cdi-dev@lists.jboss.org</font></tt></a><tt><font size="2">
&gt; <br>
&gt; </font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank"><tt><font size="2">https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size="2">
<br>
&gt; <br>
&gt; Note that for all code provided on this list, the provider <br>
&gt; licenses the code under the Apache License, Version 2 <br>
&gt; ( </font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank"><tt><font size="2">http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size="2">
). For all other <br>
&gt; ideas provided on this list, the provider waives all patent and <br>
&gt; other intellectual property rights inherent in such information. <br>
&gt; <br>
&gt; Unless stated otherwise above: <br>
&gt; IBM United Kingdom Limited - Registered in England and Wales <br>
&gt; with number 741598. <br>
&gt; Registered office: PO Box 41, North Harbour, Portsmouth, <br>
&gt; Hampshire PO6 3AU <br>
&gt; <br>
&gt; <br>
&gt; <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; </font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank"><tt><font size="2">https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size="2">
<br>
&gt; <br>
&gt; Note that for all code provided on this list, the provider licenses
the code under the Apache License, Version 2 ( </font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank"><tt><font size="2">http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size="2">
). 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>
-- <br>
Martin Kouba <br>
Software Engineer <br>
Red Hat, Czech Republic <br>
_______________________________________________ <br>
cdi-dev mailing list <br>
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a> <br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank"><tt><font size="2">https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size="2">
<br>
<br>
Note that for all code provided on this list, the provider licenses the
code under the Apache License, Version 2 ( </font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank"><tt><font size="2">http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size="2">
). 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>
Unless stated otherwise above: <br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU <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>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank"><tt><font size="2">https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size="2"><br>
<br>
Note that for all code provided on this list, the provider licenses the
code under the Apache License, Version 2 (</font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank"><tt><font size="2">http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size="2">).
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>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank"><tt><font size="2">https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size="2"><br>
<br>
Note that for all code provided on this list, the provider licenses the
code under the Apache License, Version 2 (</font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank"><tt><font size="2">http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size="2">).
For all other ideas provided on this list, the provider waives all patent
and other intellectual property rights inherent in such information.<br>
<br>
</font></tt>
<br><font size="2" face="sans-serif"><br>
Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU<br>
</font>_______________________________________________<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.</blockquote></div>