<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>In this specific case, that may be what's happening. &nbsp;I also am seeing it on Entity classes.</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif, Helvetica, EmojiFont, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;">
<p></p>
<div style="color:rgb(33,33,33); font-size:15px; margin:0px">
<p style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri"><span style="font-size:10.0pt; font-family:Arial; color:#3295B5">John D. Ament</span><span style="font-size:10.0pt; font-family:Arial; color:#003366"><br>
</span><span style="font-size:10.0pt; font-family:Arial; color:#808175">Cloud Software Architect</span><b><span style="font-size:10.0pt; font-family:Arial; color:#879637"></span></b></p>
<p style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri"><span style="font-size:10.0pt; font-family:Arial; color:#808175">Sparta Systems<br>
</span><span style="font-size:10.0pt; font-family:Arial; color:#1E487C"><br>
</span><span style="font-size:10.0pt; font-family:Arial; color:#808175">p. 609.807.5466
</span><span style="font-size:10.0pt; font-family:Arial; color:#3295B5">|</span><span style="font-size:10.0pt; font-family:Arial; color:#2E74B5">
</span><span style="font-size:10.0pt; font-family:Arial; color:#808175">m.</span><span style="font-size:10.0pt; font-family:Arial; color:#2E74B5">
</span><span style="font-size:10.0pt; font-family:Arial; color:#808175">609.553.6130</span></p>
<p style="margin:0in 0in 0.0001pt; font-size:11pt; font-family:Calibri"><span style="color:rgb(5,99,193); text-decoration:underline"><span style="font-size:10.0pt; font-family:Arial; color:#7F7F7F"><a href="mailto:john.ament@spartasystems.com" id="LPNoLP"><span style="color:rgb(117,123,128)">john.ament@spartasystems.com</span></a>&nbsp;</span></span><span style="font-size:10.0pt; font-family:Arial; color:#3295B5">|</span><span style="font-size:10.0pt; font-family:Arial; color:#2E74B5">
</span><span style="color:rgb(127,127,127); text-decoration:underline; font-size:10pt; font-family:Arial"><a href="http://www.spartasystems.com" id="LPNoLP"><span style="color:rgb(117,123,128)">www.spartasystems.com</span></a><a href="http://www.spartasystems.com/" id="LPNoLP"></a></span><span style="font-size:10.0pt; font-family:Arial; color:#7F7F7F"></span></p>
<br>
</div>
<div style="color:rgb(33,33,33); font-size:15px; margin:0px"><br>
</div>
<p></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> Matej Novotny &lt;manovotn@redhat.com&gt;<br>
<b>Sent:</b> Monday, July 24, 2017 10:36 AM<br>
<b>To:</b> John Ament<br>
<b>Cc:</b> Tomas Remes; cdi-dev<br>
<b>Subject:</b> Re: [cdi-dev] ProcessAnnotatedType &amp; Bean Discovery mode</font>
<div>&nbsp;</div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi John,<br>
<br>
I took a look at the Hammock test and I think you are sailing unspecified waters, so to say.<br>
You are right that Weld picks up DefaultListener as a bean even without BDA.<br>
<br>
In spec 2.0 section 26.2, there is this:<br>
&quot;In Java EE, the container automatically discovers EJB session beans and **other Java EE component class supporting injection**, in bean archives like it does for managed bean as defined in Type and Bean discovery.&quot;<br>
<br>
So in EE, Listeners should be picked up with `annotated` even without having BDA.<br>
<br>
Now, hammock is using a combination of Weld SE &#43; Servlet right?<br>
So the EE isn't your case, but then again spec doesn't talk about servlet at all.<br>
Therefore, I would say this is up to implementations to decide.<br>
<br>
Thoughts,opinions?<br>
<br>
Matej<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;John Ament&quot; &lt;john.ament@spartasystems.com&gt;<br>
&gt; To: &quot;Tomas Remes&quot; &lt;tremes@redhat.com&gt;<br>
&gt; Cc: &quot;Matej Novotny&quot; &lt;manovotn@redhat.com&gt;, &quot;cdi-dev&quot; &lt;cdi-dev@lists.jboss.org&gt;<br>
&gt; Sent: Monday, July 24, 2017 2:49:53 PM<br>
&gt; Subject: Re: [cdi-dev] ProcessAnnotatedType &amp; Bean Discovery mode<br>
&gt; <br>
&gt; Sorry, should have been &quot;DefaultListener&quot;<br>
&gt; <br>
&gt; <br>
&gt; John<br>
&gt; <br>
&gt; <br>
&gt; ________________________________<br>
&gt; From: Tomas Remes &lt;tremes@redhat.com&gt;<br>
&gt; Sent: Monday, July 24, 2017 7:59 AM<br>
&gt; To: John Ament<br>
&gt; Cc: Matej Novotny; cdi-dev<br>
&gt; Subject: Re: [cdi-dev] ProcessAnnotatedType &amp; Bean Discovery mode<br>
&gt; <br>
&gt; <br>
&gt; DefaultServlet appears to have @Dependent annotation.<br>
&gt; <br>
&gt; <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">
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>
&gt; <br>
&gt; T.<br>
&gt; <br>
&gt; ----- Original Message -----<br>
&gt; From: &quot;John Ament&quot; &lt;john.ament@spartasystems.com&gt;<br>
&gt; To: &quot;Matej Novotny&quot; &lt;manovotn@redhat.com&gt;<br>
&gt; Cc: &quot;cdi-dev&quot; &lt;cdi-dev@lists.jboss.org&gt;<br>
&gt; Sent: Monday, July 24, 2017 1:35:16 PM<br>
&gt; Subject: Re: [cdi-dev] ProcessAnnotatedType &amp; Bean Discovery mode<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; The issue has to do with ProcessAnnotatedType firing in a bean archive of<br>
&gt; discovery mode &quot;annotated.&quot; I think we all agree that if the discovery mode<br>
&gt; is all with a trim flag, it works correctly.<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; It appears that if you have an Arquillian test in Weld, where a class has no<br>
&gt; bean defining annotations, it still has a PAT fired. If you look at<br>
&gt; <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><br>
&gt; you'll see it includes a DefaultServlet class, which has no bean defining<br>
&gt; annotations. In Weld, this generates a PAT, but in OWB it does not.<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; John<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; From: Matej Novotny &lt;manovotn@redhat.com&gt;<br>
&gt; Sent: Monday, July 24, 2017 6:38 AM<br>
&gt; To: John Ament<br>
&gt; Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev<br>
&gt; Subject: Re: [cdi-dev] ProcessAnnotatedType &amp; Bean Discovery mode<br>
&gt; What case exactly do you think Weld does incorrectly?<br>
&gt; <br>
&gt; If you have beans.xml `all` with `&lt;trimm/&gt;`, you should be firing PAT for<br>
&gt; all. That's what me and Martin said.<br>
&gt; <br>
&gt; Matej<br>
&gt; <br>
&gt; ----- Original Message -----<br>
&gt; &gt; From: &quot;John Ament&quot; &lt;john.ament@spartasystems.com&gt;<br>
&gt; &gt; To: &quot;Antoine Sabot-Durand&quot; &lt;asd@redhat.com&gt;, &quot;Martin Kouba&quot;<br>
&gt; &gt; &lt;mkouba@redhat.com&gt;<br>
&gt; &gt; Cc: &quot;cdi-dev&quot; &lt;cdi-dev@lists.jboss.org&gt;<br>
&gt; &gt; Sent: Monday, July 24, 2017 12:09:16 PM<br>
&gt; &gt; Subject: Re: [cdi-dev] ProcessAnnotatedType &amp; Bean Discovery mode<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Then that means Weld is doing it wrong (firing PAT for all classes).<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; John<br>
&gt; &gt;<br>
&gt; &gt; From: Antoine Sabot-Durand &lt;asd@redhat.com&gt;<br>
&gt; &gt; Sent: Monday, July 24, 2017 4:31 AM<br>
&gt; &gt; To: Martin Kouba<br>
&gt; &gt; Cc: John Ament; cdi-dev<br>
&gt; &gt; Subject: Re: [cdi-dev] ProcessAnnotatedType &amp; Bean Discovery mode<br>
&gt; &gt; Yes it’s the correct interpretation.<br>
&gt; &gt; Confusion may come from the fact that we first considered to specify this<br>
&gt; &gt; feature the other way around (discover all types on implicites bean archive<br>
&gt; &gt; but only keep classes with BDA for bean discovery). We switched to this<br>
&gt; &gt; approach because we thought it was better for backward compatibility.<br>
&gt; &gt;<br>
&gt; &gt; Antoine<br>
&gt; &gt;<br>
&gt; &gt; &gt; Le 24 juil. 2017 à 08:27, Martin Kouba &lt;mkouba@redhat.com&gt; a écrit :<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hi John,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I think OWB interpretation is correct.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; In an implicit bean archive (implicit = bean archive with<br>
&gt; &gt; &gt; bean-discovery-mode=annotated) PAT is only fired for discovered types<br>
&gt; &gt; &gt; and the container only discovers each class with a bean defining<br>
&gt; &gt; &gt; annotation.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; For trimmed bean archive - only explicit bean archives may be marked as<br>
&gt; &gt; &gt; 'trimmed'. PAT is fired there but if it does not have a bean defining<br>
&gt; &gt; &gt; annotation it's removed from the set of discovered types, i.e. no bean<br>
&gt; &gt; &gt; is created.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Martin<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Dne 23.7.2017 v 14:32 John Ament napsal(a):<br>
&gt; &gt; &gt;&gt; Hi,<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; An issue popped up in OWB wanted to get the EG's perspective on this.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; I have a given bean archive, with a class in it (no bean defining<br>
&gt; &gt; &gt;&gt; annotations). My interpretation of [1] and [2] is that this class is<br>
&gt; &gt; &gt;&gt; fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In<br>
&gt; &gt; &gt;&gt; OWB, if I do bean-discovery-mode=annotated it does not get fired, but if<br>
&gt; &gt; &gt;&gt; it is all, even with a &lt;trim/&gt; a PAT gets fired. However it seems that<br>
&gt; &gt; &gt;&gt; it should get fired before anything is even considered about the class,<br>
&gt; &gt; &gt;&gt; and whether it has annotations.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; [1]:<br>
&gt; &gt; &gt;&gt; <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>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Contexts and Dependency Injection for the Java EE platform<br>
&gt; &gt; docs.jboss.org<br>
&gt; &gt; A well-defined lifecycle for stateful objects bound to lifecycle contexts,<br>
&gt; &gt; where the set of contexts is extensible. A sophisticated, typesafe<br>
&gt; &gt; dependency injection ...<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; [2]:<br>
&gt; &gt; &gt;&gt; <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>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; John<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; ------------------------------------------------------------------------<br>
&gt; &gt; &gt;&gt; NOTICE: This e-mail message and any attachments may contain<br>
&gt; &gt; &gt;&gt; confidential, proprietary, and/or privileged information which should be<br>
&gt; &gt; &gt;&gt; treated accordingly. If you are not the intended recipient, please<br>
&gt; &gt; &gt;&gt; notify the sender immediately by return e-mail, delete this message, and<br>
&gt; &gt; &gt;&gt; destroy all physical and electronic copies. Thank you.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; _______________________________________________<br>
&gt; &gt; &gt;&gt; cdi-dev mailing list<br>
&gt; &gt; &gt;&gt; cdi-dev@lists.jboss.org<br>
&gt; &gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; cdi-dev Info Page - lists.jboss.org Mailing Lists<br>
&gt; &gt; lists.jboss.org<br>
&gt; &gt; List to discuss the development of CDI (the specification) To see the<br>
&gt; &gt; collection of prior postings to the list, visit the cdi-dev Archives.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; Note that for all code provided on this list, the provider licenses the<br>
&gt; &gt; &gt;&gt; code under the Apache License, Version 2 (<br>
&gt; &gt; &gt;&gt; <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>
&gt; &gt; &gt;&gt; provided on this list, the provider waives all patent and other<br>
&gt; &gt; &gt;&gt; intellectual property rights inherent in such information.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt; &gt; Martin Kouba<br>
&gt; &gt; &gt; Senior Software Engineer<br>
&gt; &gt; &gt; Red Hat, Czech Republic<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; cdi-dev mailing list<br>
&gt; &gt; &gt; cdi-dev@lists.jboss.org<br>
&gt; &gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Note that for all code provided on this list, the provider licenses the<br>
&gt; &gt; &gt; code under the Apache License, Version 2 (<br>
&gt; &gt; &gt; <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>
&gt; &gt; &gt; provided on this list, the provider waives all patent and other<br>
&gt; &gt; &gt; intellectual property rights inherent in such information.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; NOTICE: This e-mail message and any attachments may contain confidential,<br>
&gt; &gt; proprietary, and/or privileged information which should be treated<br>
&gt; &gt; accordingly. If you are not the intended recipient, please notify the<br>
&gt; &gt; sender<br>
&gt; &gt; immediately by return e-mail, delete this message, and destroy all physical<br>
&gt; &gt; and electronic copies. Thank you.<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; cdi-dev mailing list<br>
&gt; &gt; cdi-dev@lists.jboss.org<br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;<br>
&gt; &gt; Note that for all code provided on this list, the provider licenses the<br>
&gt; &gt; code<br>
&gt; &gt; under the Apache License, Version 2<br>
&gt; &gt; ( <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>
&gt; &gt; provided on this list, the provider waives all patent and other<br>
&gt; &gt; intellectual<br>
&gt; &gt; property rights inherent in such information.<br>
&gt; <br>
&gt; NOTICE: This e-mail message and any attachments may contain confidential,<br>
&gt; proprietary, and/or privileged information which should be treated<br>
&gt; accordingly. If you are not the intended recipient, please notify the sender<br>
&gt; immediately by return e-mail, delete this message, and destroy all physical<br>
&gt; and electronic copies. Thank you.<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; cdi-dev@lists.jboss.org<br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev">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<br>
&gt; under the Apache License, Version 2<br>
&gt; (<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>
&gt; provided on this list, the provider waives all patent and other intellectual<br>
&gt; property rights inherent in such information.<br>
&gt; <br>
&gt; --<br>
&gt; Tomas Remes<br>
&gt; <br>
&gt; <br>
&gt; ________________________________<br>
&gt; NOTICE: This e-mail message and any attachments may contain confidential,<br>
&gt; proprietary, and/or privileged information which should be treated<br>
&gt; accordingly. If you are not the intended recipient, please notify the sender<br>
&gt; immediately by return e-mail, delete this message, and destroy all physical<br>
&gt; and electronic copies. Thank you.<br>
&gt; <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>