Well, we're discussing the spec wording which should be clear and
accurate. What users follow or not is a different thing, and should be
covered in tutorials, blogposts and docs.
To sum it up:
* type discovery is covered in "12.4.1. Type discovery"
* the "trimming" process happens AFTER type discovery and BEFORE bean
discovery ("12.4.3. Bean discovery")
Therefore, we cannot say that "for a type to be discovered it must
have..." because for trimmed archives the type is always discovered and
then, if it does not meet the conditions, thrown away (no beans are
created from it).
Martin
Dne 21.11.2016 v 14:53 John Ament napsal(a):
What you're referring to is a nuance that most users don't
follow. A
PAT is fired for essentially every class found. If this works
differently (e.g. for bean-discovery-mode=none) then it may be worth
calling this out, but as of now it should be implicit that PAT works
differently.
John
------------------------------------------------------------------------
*From:* Antoine Sabot-Durand <antoine(a)sabot-durand.net>
*Sent:* Monday, November 21, 2016 5:07 AM
*To:* Martin Kouba; John Ament; CDI Java EE Specification
*Subject:* Re: [cdi-dev] Need native speaker for CDI-420 (trim) reword
+1 for Martin. I didn't read with enough attention. All Types should be
discovered like in All bean-discovery mode , but only those with bean
defining annotation or scope should be eligible to become beans.
On Mon, Nov 21, 2016 at 9:15 AM Martin Kouba <mkouba(a)redhat.com
<mailto:mkouba@redhat.com>> wrote:
Hi John,
sounds good but is not entirely correct because those type ARE actually
discovered (ProcessAnnotatedType is fired etc.) and then removed (if
necessary) from the set of discovered types before the "Bean discovery"
phase.
Martin
Dne 18.11.2016 v 16:50 John Ament napsal(a):
> Here's my take..
>
>
> "If an explicit bean archive contains the `<trim/>` element in its
> `beans.xml` file, then for a type to be discovered it must have
either a
> scope annotation (normal or pseudo) or a bean defining annotation (as
> defined in <<bean_defining_annotations>>)"
>
>
> John
>
>
>
>
------------------------------------------------------------------------
> *From:* cdi-dev-bounces(a)lists.jboss.org
<mailto:cdi-dev-bounces@lists.jboss.org>
> <cdi-dev-bounces(a)lists.jboss.org
<mailto:cdi-dev-bounces@lists.jboss.org>> on behalf of Antoine
Sabot-Durand
> <antoine(a)sabot-durand.net <mailto:antoine@sabot-durand.net>>
> *Sent:* Friday, November 18, 2016 9:30 AM
> *To:* CDI Java EE Specification
> *Subject:* [cdi-dev] Need native speaker for CDI-420 (trim) reword
>
> Hi all,
>
>
> With Martin, we reword the <trim/> section like:
>
> "If an explicit bean archive contains the `<trim/>` element in its
> `beans.xml` file, types that don't have either a bean defining
> annotation (as defined in <<bean_defining_annotations>>) or any
scope
> annotation, are removed from the set of discovered types."
>
> Grammar feedback from native speaker is most welcome.
>
> Antoine
>
------------------------------------------------------------------------
> 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.
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org <mailto:cdi-dev@lists.jboss.org>
>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider
licenses the code under the Apache License, Version 2
(
http://www.apache.org/licenses/LICENSE-2.0.html). For all other
ideas provided on this list, the provider waives all patent and
other intellectual property rights inherent in such information.
>
--
Martin Kouba
Software Engineer
Red Hat, Czech Republic
------------------------------------------------------------------------
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.