[cdi-dev] Need native speaker for CDI-420 (trim) reword

John Ament john.ament at spartasystems.com
Mon Nov 21 20:51:20 EST 2016


Makes sense if we want to add "as a bean" to the discovered text as a classifier for its usage.


John


________________________________
From: Emily Jiang <EMIJIANG at uk.ibm.com>
Sent: Monday, November 21, 2016 12:05 PM
To: Martin Kouba
Cc: John Ament; Antoine Sabot-Durand; CDI Java EE Specification
Subject: Re: [cdi-dev] Need native speaker for CDI-420 (trim) reword

+1 on Martin's suggestion!
How about the following rewording?
 "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>>)"
=>
 "If an explicit bean archive contains the `<trim/>` element in its `beans.xml` file, then for a class to be discovered as a bean it must have either a scope annotation (normal or pseudo) or a bean defining annotation (as defined in <<bean_defining_annotations>>)"

Many thanks,
Emily
===========================
Emily Jiang
WebSphere Application Server, CDI Development Lead

MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN
Phone:  +44 (0)1962 816278  Internal: 246278

Email: emijiang at uk.ibm.com
Lotus Notes: Emily Jiang/UK/IBM at IBMGB




From:        Martin Kouba <mkouba at redhat.com>
To:        John Ament <john.ament at spartasystems.com>, Antoine Sabot-Durand <antoine at sabot-durand.net>, CDI Java EE Specification <cdi-dev at lists.jboss.org>
Date:        21/11/2016 14:34
Subject:        Re: [cdi-dev] Need native speaker for CDI-420 (trim) reword
Sent by:        cdi-dev-bounces at lists.jboss.org
________________________________



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 at 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 at redhat.com
> <mailto:mkouba at 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 at lists.jboss.org
>     <mailto:cdi-dev-bounces at lists.jboss.org>
>     > <cdi-dev-bounces at lists.jboss.org
>     <mailto:cdi-dev-bounces at lists.jboss.org>> on behalf of Antoine
>     Sabot-Durand
>     > <antoine at sabot-durand.net <mailto:antoine at 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 at lists.jboss.org <mailto:cdi-dev at 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.

--
Martin Kouba
Software Engineer
Red Hat, Czech Republic
_______________________________________________
cdi-dev mailing list
cdi-dev at 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.



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
________________________________
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20161122/1368c61c/attachment.html 


More information about the cdi-dev mailing list