<font size=2 face="sans-serif">Thanks Martin for your reply! Your reply
confirmed my understanding of @Vetoed.</font>
<br>
<br><font size=2 face="sans-serif">What is the expected behaviour if I
exclude my JavaEE component class in the filter under beans.xml? Will this
cause the JavaEE component class being ignored by CDI or this should have
the same effect as being annotated as @Vetoed?</font>
<br>
<br><tt><font size=2>&quot;In the 12.4.2, it states: If the filter is active,
and: .... then we say that the type is excluded from discovery.&quot; </font></tt>
<br>
<br><font size=2 face="sans-serif">Does the above discovery mean both type
and bean discovery or just bean discovery? If it means both type and bean
discovery, the classes should be ignored by CDI. Please confirm.</font>
<br>
<br><font size=2 face="sans-serif">Many thanks,<br>
Emily<br>
===========================<br>
Emily Jiang<br>
WebSphere Application Server Liberty Profile development, 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">Martin Kouba &lt;mkouba@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,
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">07/08/2015 03:40</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]
Clarification on the difference on Vetoed and exclude filters regarding
Java EE component classes</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>Dne 6.8.2015 v 15:55 Emily Jiang napsal(a):<br>
&gt; In the section 3.6. Java EE components of CDI 1.2 specification, it
has<br>
&gt; the following statement:<br>
&gt;<br>
&gt; /It is safe to annotate Java EE components with //@Vetoed //to prevent<br>
&gt; them being considered beans./<br>
&gt;<br>
&gt; According to my understanding, the JavaEE component classes with @Vetoed<br>
&gt; should still support injections and *ProcessInjectionTarget*events<br>
&gt; should still be fired.<br>
&gt;<br>
&gt; In the 12.4.2, it states:<br>
&gt; /If the filter is active, and: .... then we say that the type is<br>
&gt; excluded from discovery./<br>
&gt;<br>
&gt; Does this mean if a JavaEE component class is excluded from the scan
in<br>
&gt; the beans.xml, its CDI involvement should be ignored (@Inject would
be<br>
&gt; ignored etc)?<br>
<br>
I don't think so. I believe the intent of &quot;3.6. Java EE components&quot;
is <br>
to clarify that if a component class (e.g. a servlet class) is also <br>
recognized as a managed bean [1] there will be two different <br>
&quot;components&quot; in your applicaion, each managed by a different
Java EE <br>
technology - e.g. a servlet managed by the servlet container and a CDI
<br>
bean with servlet class in its set of bean types.<br>
<br>
The servlet has a different lifecycle, it's managed by a servlet <br>
container and as such must support injection (but cannot be injected, etc.).<br>
<br>
This might be confusing and therefore it's a good idea to veto the Java
<br>
EE component classes -&gt; there will be no CDI bean definitions based
on <br>
the component classes.<br>
<br>
[1]<br>
</font></tt><a href="http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#what_classes_are_beans"><tt><font size=2>http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#what_classes_are_beans</font></tt></a><tt><font size=2><br>
<br>
<br>
&gt;<br>
&gt; Many thanks,<br>
&gt; Emily<br>
&gt; ===========================<br>
&gt; Emily Jiang<br>
&gt; WebSphere Application Server Liberty Profile development, CDI<br>
&gt; Development Lead<br>
&gt;<br>
&gt; MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN<br>
&gt; Phone: &nbsp;+44 (0)1962 816278 &nbsp;Internal: 246278<br>
&gt;<br>
&gt; Email: emijiang@uk.ibm.com<br>
&gt; Lotus Notes: Emily Jiang/UK/IBM@IBMGB<br>
&gt;<br>
&gt; Unless stated otherwise above:<br>
&gt; IBM United Kingdom Limited - Registered in England and Wales with
number<br>
&gt; 741598.<br>
&gt; Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
PO6 3AU<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>
</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>