<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">&nbsp;<br>
MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN<br>
Phone: &nbsp;+44 (0)1962 816278 &nbsp;Internal: 246278<br>
<br>
Email: emijiang@uk.ibm.com <br>
Lotus Notes: Emily Jiang/UK/IBM@IBMGB<br>
</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Tomas Remes &lt;tremes@redhat.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Emily Jiang/UK/IBM@IBMGB,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">cdi-dev@lists.jboss.org</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">21/07/2016 07:13</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [cdi-dev]
CDI-616 Injection point declared as transient is &nbsp; &nbsp; &nbsp; &nbsp;not
&nbsp; &nbsp; &nbsp; &nbsp;useful</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">cdi-dev-bounces@lists.jboss.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2><br>
As you said. If we introduce definition error for this it won't be backward
compatible so warning could be sufficient I think and therefore (maybe)
I wouldn't solve this at specification level but only at implementation
level. That's my current feeling.<br>
<br>
Tom<br>
<br>
----- Original Message -----<br>
From: &quot;Emily Jiang&quot; &lt;EMIJIANG@uk.ibm.com&gt;<br>
To: &quot;Martin Kouba&quot; &lt;mkouba@redhat.com&gt;<br>
Cc: cdi-dev@lists.jboss.org<br>
Sent: Wednesday, July 20, 2016 5:43:59 PM<br>
Subject: Re: [cdi-dev] CDI-616 Injection point declared as transient is
not &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
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'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: emijiang@uk.ibm.com <br>
Lotus Notes: Emily Jiang/UK/IBM@IBMGB <br>
<br>
<br>
<br>
<br>
From: Martin Kouba &lt;mkouba@redhat.com&gt; <br>
To: cdi-dev@lists.jboss.org, <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: cdi-dev-bounces@lists.jboss.org <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't have any real use case, I'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'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;EMIJIANG@uk.ibm.com <br>
&gt; &lt; </font></tt><a href=mailto:EMIJIANG@uk.ibm.com><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: emijiang@uk.ibm.com &lt; </font></tt><a href=mailto:emijiang@uk.ibm.com><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;stephan@knitelius.com <br>
&gt; &lt; </font></tt><a href=mailto:stephan@knitelius.com><tt><font size=2>mailto:stephan@knitelius.com</font></tt></a><tt><font size=2>
&gt;&gt; <br>
&gt; To: cdi-dev &lt;cdi-dev@lists.jboss.org <br>
&gt; &lt; </font></tt><a href="mailto:cdi-dev@lists.jboss.org"><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: cdi-dev-bounces@lists.jboss.org <br>
&gt; &lt; </font></tt><a href="mailto:cdi-dev-bounces@lists.jboss.org"><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; cdi-dev@lists.jboss.org &lt; </font></tt><a href="mailto:cdi-dev@lists.jboss.org"><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"><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"><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; cdi-dev@lists.jboss.org <br>
&gt; </font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><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"><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>
cdi-dev@lists.jboss.org <br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><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"><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>
cdi-dev@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><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"><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>
cdi-dev@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><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"><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>