<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Sorry, should have been "DefaultListener"</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="background-color: rgb(255, 255, 255);">
<div style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 15px; margin: 0px;">
John </div>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
</p>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Tomas Remes <tremes@redhat.com><br>
<b>Sent:</b> Monday, July 24, 2017 7:59 AM<br>
<b>To:</b> John Ament<br>
<b>Cc:</b> Matej Novotny; cdi-dev<br>
<b>Subject:</b> Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
DefaultServlet appears to have @Dependent annotation.<br>
<br>
<a href="https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/DefaultServlet.java#L31" id="LPlnk521091">https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/DefaultServlet.java#L31</a><br>
<br>
T.<br>
<br>
----- Original Message -----<br>
From: "John Ament" <john.ament@spartasystems.com><br>
To: "Matej Novotny" <manovotn@redhat.com><br>
Cc: "cdi-dev" <cdi-dev@lists.jboss.org><br>
Sent: Monday, July 24, 2017 1:35:16 PM<br>
Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode<br>
<br>
<br>
<br>
The issue has to do with ProcessAnnotatedType firing in a bean archive of discovery mode "annotated." I think we all agree that if the discovery mode is all with a trim flag, it works correctly.
<br>
<br>
<br>
<br>
<br>
It appears that if you have an Arquillian test in Weld, where a class has no bean defining annotations, it still has a PAT fired. If you look at
<a href="https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java">
https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java</a> you'll see it includes a DefaultServlet class, which has no bean defining annotations. In Weld, this generates a PAT, but in OWB
it does not. <br>
<br>
<br>
<br>
<br>
John <br>
<br>
<br>
<br>
<br>
<br>
<br>
From: Matej Novotny <manovotn@redhat.com> <br>
Sent: Monday, July 24, 2017 6:38 AM <br>
To: John Ament <br>
Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev <br>
Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode <br>
What case exactly do you think Weld does incorrectly? <br>
<br>
If you have beans.xml `all` with `<trimm/>`, you should be firing PAT for all. That's what me and Martin said.
<br>
<br>
Matej <br>
<br>
----- Original Message ----- <br>
> From: "John Ament" <john.ament@spartasystems.com> <br>
> To: "Antoine Sabot-Durand" <asd@redhat.com>, "Martin Kouba" <mkouba@redhat.com>
<br>
> Cc: "cdi-dev" <cdi-dev@lists.jboss.org> <br>
> Sent: Monday, July 24, 2017 12:09:16 PM <br>
> Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode <br>
> <br>
> <br>
> <br>
> Then that means Weld is doing it wrong (firing PAT for all classes). <br>
> <br>
> <br>
> <br>
> <br>
> John <br>
> <br>
> From: Antoine Sabot-Durand <asd@redhat.com> <br>
> Sent: Monday, July 24, 2017 4:31 AM <br>
> To: Martin Kouba <br>
> Cc: John Ament; cdi-dev <br>
> Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode <br>
> Yes it’s the correct interpretation. <br>
> Confusion may come from the fact that we first considered to specify this <br>
> feature the other way around (discover all types on implicites bean archive <br>
> but only keep classes with BDA for bean discovery). We switched to this <br>
> approach because we thought it was better for backward compatibility. <br>
> <br>
> Antoine <br>
> <br>
> > Le 24 juil. 2017 à 08:27, Martin Kouba <mkouba@redhat.com> a écrit : <br>
> > <br>
> > Hi John, <br>
> > <br>
> > I think OWB interpretation is correct. <br>
> > <br>
> > In an implicit bean archive (implicit = bean archive with <br>
> > bean-discovery-mode=annotated) PAT is only fired for discovered types <br>
> > and the container only discovers each class with a bean defining <br>
> > annotation. <br>
> > <br>
> > For trimmed bean archive - only explicit bean archives may be marked as <br>
> > 'trimmed'. PAT is fired there but if it does not have a bean defining <br>
> > annotation it's removed from the set of discovered types, i.e. no bean <br>
> > is created. <br>
> > <br>
> > Martin <br>
> > <br>
> > Dne 23.7.2017 v 14:32 John Ament napsal(a): <br>
> >> Hi, <br>
> >> <br>
> >> <br>
> >> An issue popped up in OWB wanted to get the EG's perspective on this. <br>
> >> <br>
> >> <br>
> >> I have a given bean archive, with a class in it (no bean defining <br>
> >> annotations). My interpretation of [1] and [2] is that this class is <br>
> >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In <br>
> >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if <br>
> >> it is all, even with a <trim/> a PAT gets fired. However it seems that <br>
> >> it should get fired before anything is even considered about the class, <br>
> >> and whether it has annotations. <br>
> >> <br>
> >> <br>
> >> [1]: <br>
> >> <a href="https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type">
https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type</a> <br>
> <br>
> <br>
> Contexts and Dependency Injection for the Java EE platform <br>
> docs.jboss.org <br>
> A well-defined lifecycle for stateful objects bound to lifecycle contexts, <br>
> where the set of contexts is extensible. A sophisticated, typesafe <br>
> dependency injection ... <br>
> <br>
> <br>
> >> <br>
> >> [2]: <br>
> >> <a href="https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type">
https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type</a> <br>
> >> <br>
> >> <br>
> >> John <br>
> >> <br>
> >> <br>
> >> ------------------------------------------------------------------------ <br>
> >> NOTICE: This e-mail message and any attachments may contain <br>
> >> confidential, proprietary, and/or privileged information which should be <br>
> >> treated accordingly. If you are not the intended recipient, please <br>
> >> notify the sender immediately by return e-mail, delete this message, and <br>
> >> destroy all physical and electronic copies. Thank you. <br>
> >> <br>
> >> <br>
> >> _______________________________________________ <br>
> >> cdi-dev mailing list <br>
> >> cdi-dev@lists.jboss.org <br>
> >> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>
<br>
> <br>
> <br>
> cdi-dev Info Page - lists.jboss.org Mailing Lists <br>
> lists.jboss.org <br>
> List to discuss the development of CDI (the specification) To see the <br>
> collection of prior postings to the list, visit the cdi-dev Archives. <br>
> <br>
> <br>
> >> <br>
> >> Note that for all code provided on this list, the provider licenses the <br>
> >> code under the Apache License, Version 2 ( <br>
> >> <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a> ). For all other ideas
<br>
> >> provided on this list, the provider waives all patent and other <br>
> >> intellectual property rights inherent in such information. <br>
> >> <br>
> > <br>
> > -- <br>
> > Martin Kouba <br>
> > Senior Software Engineer <br>
> > Red Hat, Czech Republic <br>
> > _______________________________________________ <br>
> > cdi-dev mailing list <br>
> > cdi-dev@lists.jboss.org <br>
> > <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>
<br>
> > <br>
> > Note that for all code provided on this list, the provider licenses the <br>
> > code under the Apache License, Version 2 ( <br>
> > <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a> ). For all other ideas
<br>
> > provided on this list, the provider waives all patent and other <br>
> > intellectual property rights inherent in such information. <br>
> <br>
> <br>
> NOTICE: This e-mail message and any attachments may contain confidential, <br>
> proprietary, and/or privileged information which should be treated <br>
> accordingly. If you are not the intended recipient, please notify the sender <br>
> immediately by return e-mail, delete this message, and destroy all physical <br>
> and electronic copies. Thank you. <br>
> <br>
> _______________________________________________ <br>
> cdi-dev mailing list <br>
> cdi-dev@lists.jboss.org <br>
> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">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 <br>
> under the Apache License, Version 2 <br>
> ( <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a> ). For all other ideas
<br>
> provided on this list, the provider waives all patent and other intellectual <br>
> property rights inherent in such information. <br>
<br>
NOTICE: This e-mail message and any attachments may contain confidential, proprietary, and/or privileged information which should be treated accordingly. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this
message, and destroy all physical and electronic copies. Thank you. <br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
cdi-dev@lists.jboss.org<br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">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">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>
Tomas Remes<br>
<br>
<br>
</div>
</span></font></div>
</div>
<hr>
NOTICE: This e-mail message and any attachments may contain confidential, proprietary, and/or privileged information which should be treated accordingly. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this
message, and destroy all physical and electronic copies. Thank you.
</body>
</html>