From otaviopolianasantana at gmail.com Sat Jul 8 10:10:58 2017 From: otaviopolianasantana at gmail.com (=?UTF-8?Q?Ot=C3=A1vio_Gon=C3=A7alves_de_Santana?=) Date: Sat, 8 Jul 2017 11:10:58 -0300 Subject: [cdi-dev] Injection with heritage and CDI Message-ID: Hey, I have a question about heritage and CDI. Given two interfaces: - Car interface - SportCar that extends Car interface Car{} interface SportCar extends Car{} class DefaultCar implements Car {} @FerrariQualifierclass DefaultSportCar implements SportCar {} What I would like to inject: @Injectprivate Car car; //inject DefaultCar @Inject @FerrariQualifierprivate Car ferrari; //inject DefaultSportCar @Injectprivate SportCar sportCar;//inject DefaultSportCar How can I do that? -- Ot?vio Gon?alves de Santana twitter: http://twitter.com/otaviojava site: *http://about.me/otaviojava * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170708/da772ba5/attachment-0001.html From otaviopolianasantana at gmail.com Sat Jul 8 10:20:35 2017 From: otaviopolianasantana at gmail.com (=?UTF-8?Q?Ot=C3=A1vio_Gon=C3=A7alves_de_Santana?=) Date: Sat, 8 Jul 2017 11:20:35 -0300 Subject: [cdi-dev] Injection with heritage and CDI Message-ID: Hey, I have a question about heritage and CDI. Given two interfaces: - Car interface - SportCar that extends Car interface Car{} interface SportCar extends Car{} class DefaultCar implements Car {} @FerrariQualifierclass DefaultSportCar implements SportCar {} What I would like to inject: @Injectprivate Car car; //inject DefaultCar @Inject @FerrariQualifierprivate Car ferrari; //inject DefaultSportCar @Injectprivate SportCar sportCar;//inject DefaultSportCar How can I do that? -- Ot?vio Gon?alves de Santana twitter: http://twitter.com/otaviojava site: *http://about.me/otaviojava * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170708/a77c2db4/attachment.html From rmannibucau at gmail.com Sat Jul 8 10:36:38 2017 From: rmannibucau at gmail.com (Romain Manni-Bucau) Date: Sat, 8 Jul 2017 16:36:38 +0200 Subject: [cdi-dev] Injection with heritage and CDI In-Reply-To: References: Message-ID: Hi Otavio Not sure it firts cdi-dev bit you can @Default @Ferrari @Typed(SportCar.class) the nice red car to exclude it from Car type and keep Car injection using DefaultCar and SportCar using the ferrari or implicit default qualifier. But the sample sounds like a misusage of qualifier so maybe check it is really what you and to do. Le 8 juil. 2017 16:27, "Ot?vio Gon?alves de Santana" < otaviopolianasantana at gmail.com> a ?crit : Hey, I have a question about heritage and CDI. Given two interfaces: - Car interface - SportCar that extends Car interface Car{} interface SportCar extends Car{} class DefaultCar implements Car {} @FerrariQualifierclass DefaultSportCar implements SportCar {} What I would like to inject: @Injectprivate Car car; //inject DefaultCar @Inject @FerrariQualifierprivate Car ferrari; //inject DefaultSportCar @Injectprivate SportCar sportCar;//inject DefaultSportCar How can I do that? -- Ot?vio Gon?alves de Santana twitter: http://twitter.com/otaviojava site: *http://about.me/otaviojava * _______________________________________________ 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170708/58a5d5c1/attachment.html From mkouba at redhat.com Mon Jul 10 05:13:55 2017 From: mkouba at redhat.com (Martin Kouba) Date: Mon, 10 Jul 2017 11:13:55 +0200 Subject: [cdi-dev] Injection with heritage and CDI In-Reply-To: References: Message-ID: Hi all, I think Romain's workaround would not work for the second injection point, i.e. for @Inject @FerrariQualifier Car ferrari because @Typed(SportCar.class) DefaultSportCar would remove the Car from the bean types of DefaultSportCar. I agree that it looks like an incorrect usage of qualifiers though. Martin Dne 8.7.2017 v 16:36 Romain Manni-Bucau napsal(a): > Hi Otavio > > Not sure it firts cdi-dev bit you can @Default @Ferrari > @Typed(SportCar.class) the nice red car to exclude it from Car type and > keep Car injection using DefaultCar and SportCar using the ferrari or > implicit default qualifier. > > But the sample sounds like a misusage of qualifier so maybe check it is > really what you and to do. > > > Le 8 juil. 2017 16:27, "Ot?vio Gon?alves de Santana" > > > a ?crit : > > > Hey, I have a question about heritage and CDI. > Given two interfaces: > > * Car interface > * SportCar that extends Car > > > interface Car{ > } > > interface SportCarextends Car{ > } > > > class DefaultCarimplements Car{ > } > > @FerrariQualifier > class DefaultSportCarimplements SportCar{ > } > > What I would like to inject: > > @Inject > private Car car; //inject DefaultCar > > @Inject > @FerrariQualifier > private Car ferrari; //inject DefaultSportCar > > > @Inject > private SportCar sportCar;//inject DefaultSportCar > > > > How can I do that? > > -- > Ot?vio Gon?alves de Santana > > > twitter: http://twitter.com/otaviojava > site: _http://about.me/otaviojava_ > > > _______________________________________________ > 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. > > > > > _______________________________________________ > 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. > -- Martin Kouba Senior Software Engineer Red Hat, Czech Republic From issues at jboss.org Fri Jul 21 03:02:00 2017 From: issues at jboss.org (Marcel Witte (JIRA)) Date: Fri, 21 Jul 2017 03:02:00 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-709) Should injecting the HttpServletRequest consider all used wrappers? In-Reply-To: References: Message-ID: Marcel Witte created CDI-709: -------------------------------- Summary: Should injecting the HttpServletRequest consider all used wrappers? Key: CDI-709 URL: https://issues.jboss.org/browse/CDI-709 Project: CDI Specification Issues Issue Type: Clarification Components: Java EE integration Affects Versions: 2.0 .Final Reporter: Marcel Witte For example see this bug report of rewrite: https://github.com/ocpsoft/rewrite/issues/235 If you inject the HttpServletRequest: {code:java} @Inject private HttpServletRequest request {code} then you do not get the latest created HttpServletRequestWrapper. If the wrapper is modifying the request (like adding parameters), these changes would not be visible to the application code using this injected request. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From john.ament at spartasystems.com Sun Jul 23 08:32:03 2017 From: john.ament at spartasystems.com (John Ament) Date: Sun, 23 Jul 2017 12:32:03 +0000 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode Message-ID: Hi, An issue popped up in OWB wanted to get the EG's perspective on this. I have a given bean archive, with a class in it (no bean defining annotations). My interpretation of [1] and [2] is that this class is fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In OWB, if I do bean-discovery-mode=annotated it does not get fired, but if it is all, even with a a PAT gets fired. However it seems that it should get fired before anything is even considered about the class, and whether it has annotations. [1]: https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type [2]: https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type John ________________________________ 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/20170723/95ef478e/attachment-0001.html From mkouba at redhat.com Mon Jul 24 02:27:00 2017 From: mkouba at redhat.com (Martin Kouba) Date: Mon, 24 Jul 2017 08:27:00 +0200 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: References: Message-ID: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> Hi John, I think OWB interpretation is correct. In an implicit bean archive (implicit = bean archive with bean-discovery-mode=annotated) PAT is only fired for discovered types and the container only discovers each class with a bean defining annotation. For trimmed bean archive - only explicit bean archives may be marked as 'trimmed'. PAT is fired there but if it does not have a bean defining annotation it's removed from the set of discovered types, i.e. no bean is created. Martin Dne 23.7.2017 v 14:32 John Ament napsal(a): > Hi, > > > An issue popped up in OWB wanted to get the EG's perspective on this. > > > I have a given bean archive, with a class in it (no bean defining > annotations). My interpretation of [1] and [2] is that this class is > fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In > OWB, if I do bean-discovery-mode=annotated it does not get fired, but if > it is all, even with a a PAT gets fired. However it seems that > it should get fired before anything is even considered about the class, > and whether it has annotations. > > > [1]: > https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > [2]: > https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > > > John > > > ------------------------------------------------------------------------ > 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 > 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 Senior Software Engineer Red Hat, Czech Republic From manovotn at redhat.com Mon Jul 24 04:00:18 2017 From: manovotn at redhat.com (Matej Novotny) Date: Mon, 24 Jul 2017 04:00:18 -0400 (EDT) Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: References: Message-ID: <49113360.33742974.1500883218214.JavaMail.zimbra@redhat.com> Hi It sounds like they they have it correct - with `annotated` mode you only fire PAT for classes with bean defining annotation. With mode `all` it will obviously fire PAT and if we are talking then you fire PAT for all and then only continue processing those which have bean defining annotations. Matej ----- Original Message ----- > From: "John Ament" > To: "cdi-dev" > Sent: Sunday, July 23, 2017 2:32:03 PM > Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > Hi, > > > > > An issue popped up in OWB wanted to get the EG's perspective on this. > > > > > I have a given bean archive, with a class in it (no bean defining > annotations). My interpretation of [1] and [2] is that this class is fired > as a ProcessAnnotatedType, regardless of what is in beans.xml. In OWB, if I > do bean-discovery-mode=annotated it does not get fired, but if it is all, > even with a a PAT gets fired. However it seems that it should get > fired before anything is even considered about the class, and whether it has > annotations. > > > > > [1]: https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > [2]: https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > > > John > > > > > > > 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 > 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. From asd at redhat.com Mon Jul 24 04:31:50 2017 From: asd at redhat.com (Antoine Sabot-Durand) Date: Mon, 24 Jul 2017 10:31:50 +0200 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> Message-ID: <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> Yes it?s the correct interpretation. Confusion may come from the fact that we first considered to specify this feature the other way around (discover all types on implicites bean archive but only keep classes with BDA for bean discovery). We switched to this approach because we thought it was better for backward compatibility. Antoine > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > Hi John, > > I think OWB interpretation is correct. > > In an implicit bean archive (implicit = bean archive with > bean-discovery-mode=annotated) PAT is only fired for discovered types > and the container only discovers each class with a bean defining annotation. > > For trimmed bean archive - only explicit bean archives may be marked as > 'trimmed'. PAT is fired there but if it does not have a bean defining > annotation it's removed from the set of discovered types, i.e. no bean > is created. > > Martin > > Dne 23.7.2017 v 14:32 John Ament napsal(a): >> Hi, >> >> >> An issue popped up in OWB wanted to get the EG's perspective on this. >> >> >> I have a given bean archive, with a class in it (no bean defining >> annotations). My interpretation of [1] and [2] is that this class is >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if >> it is all, even with a a PAT gets fired. However it seems that >> it should get fired before anything is even considered about the class, >> and whether it has annotations. >> >> >> [1]: >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type >> >> [2]: >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type >> >> >> John >> >> >> ------------------------------------------------------------------------ >> 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 >> 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 > Senior 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. From john.ament at spartasystems.com Mon Jul 24 06:09:16 2017 From: john.ament at spartasystems.com (John Ament) Date: Mon, 24 Jul 2017 10:09:16 +0000 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com>, <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> Message-ID: Then that means Weld is doing it wrong (firing PAT for all classes). John ________________________________ From: Antoine Sabot-Durand Sent: Monday, July 24, 2017 4:31 AM To: Martin Kouba Cc: John Ament; cdi-dev Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode Yes it?s the correct interpretation. Confusion may come from the fact that we first considered to specify this feature the other way around (discover all types on implicites bean archive but only keep classes with BDA for bean discovery). We switched to this approach because we thought it was better for backward compatibility. Antoine > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > Hi John, > > I think OWB interpretation is correct. > > In an implicit bean archive (implicit = bean archive with > bean-discovery-mode=annotated) PAT is only fired for discovered types > and the container only discovers each class with a bean defining annotation. > > For trimmed bean archive - only explicit bean archives may be marked as > 'trimmed'. PAT is fired there but if it does not have a bean defining > annotation it's removed from the set of discovered types, i.e. no bean > is created. > > Martin > > Dne 23.7.2017 v 14:32 John Ament napsal(a): >> Hi, >> >> >> An issue popped up in OWB wanted to get the EG's perspective on this. >> >> >> I have a given bean archive, with a class in it (no bean defining >> annotations). My interpretation of [1] and [2] is that this class is >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if >> it is all, even with a a PAT gets fired. However it seems that >> it should get fired before anything is even considered about the class, >> and whether it has annotations. >> >> >> [1]: >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type Contexts and Dependency Injection for the Java EE platform docs.jboss.org A well-defined lifecycle for stateful objects bound to lifecycle contexts, where the set of contexts is extensible. A sophisticated, typesafe dependency injection ... >> >> [2]: >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type >> >> >> John >> >> >> ------------------------------------------------------------------------ >> 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 >> https://lists.jboss.org/mailman/listinfo/cdi-dev cdi-dev Info Page - lists.jboss.org Mailing Lists lists.jboss.org List to discuss the development of CDI (the specification) To see the collection of prior postings to the list, visit the cdi-dev Archives. >> >> 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 > Senior 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. ________________________________ 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/20170724/7faef6d4/attachment-0001.html From manovotn at redhat.com Mon Jul 24 06:38:05 2017 From: manovotn at redhat.com (Matej Novotny) Date: Mon, 24 Jul 2017 06:38:05 -0400 (EDT) Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> Message-ID: <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> What case exactly do you think Weld does incorrectly? If you have beans.xml `all` with ``, you should be firing PAT for all. That's what me and Martin said. Matej ----- Original Message ----- > From: "John Ament" > To: "Antoine Sabot-Durand" , "Martin Kouba" > Cc: "cdi-dev" > Sent: Monday, July 24, 2017 12:09:16 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > Then that means Weld is doing it wrong (firing PAT for all classes). > > > > > John > > From: Antoine Sabot-Durand > Sent: Monday, July 24, 2017 4:31 AM > To: Martin Kouba > Cc: John Ament; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > Yes it?s the correct interpretation. > Confusion may come from the fact that we first considered to specify this > feature the other way around (discover all types on implicites bean archive > but only keep classes with BDA for bean discovery). We switched to this > approach because we thought it was better for backward compatibility. > > Antoine > > > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > > > Hi John, > > > > I think OWB interpretation is correct. > > > > In an implicit bean archive (implicit = bean archive with > > bean-discovery-mode=annotated) PAT is only fired for discovered types > > and the container only discovers each class with a bean defining > > annotation. > > > > For trimmed bean archive - only explicit bean archives may be marked as > > 'trimmed'. PAT is fired there but if it does not have a bean defining > > annotation it's removed from the set of discovered types, i.e. no bean > > is created. > > > > Martin > > > > Dne 23.7.2017 v 14:32 John Ament napsal(a): > >> Hi, > >> > >> > >> An issue popped up in OWB wanted to get the EG's perspective on this. > >> > >> > >> I have a given bean archive, with a class in it (no bean defining > >> annotations). My interpretation of [1] and [2] is that this class is > >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In > >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if > >> it is all, even with a a PAT gets fired. However it seems that > >> it should get fired before anything is even considered about the class, > >> and whether it has annotations. > >> > >> > >> [1]: > >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > > Contexts and Dependency Injection for the Java EE platform > docs.jboss.org > A well-defined lifecycle for stateful objects bound to lifecycle contexts, > where the set of contexts is extensible. A sophisticated, typesafe > dependency injection ... > > > >> > >> [2]: > >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > >> > >> > >> John > >> > >> > >> ------------------------------------------------------------------------ > >> 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 > >> https://lists.jboss.org/mailman/listinfo/cdi-dev > > > cdi-dev Info Page - lists.jboss.org Mailing Lists > lists.jboss.org > List to discuss the development of CDI (the specification) To see the > collection of prior postings to the list, visit the cdi-dev Archives. > > > >> > >> 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 > > Senior 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. > > > 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 > 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. From john.ament at spartasystems.com Mon Jul 24 07:35:16 2017 From: john.ament at spartasystems.com (John Ament) Date: Mon, 24 Jul 2017 11:35:16 +0000 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> , <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> Message-ID: 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. 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 https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java 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. John ________________________________ From: Matej Novotny Sent: Monday, July 24, 2017 6:38 AM To: John Ament Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode What case exactly do you think Weld does incorrectly? If you have beans.xml `all` with ``, you should be firing PAT for all. That's what me and Martin said. Matej ----- Original Message ----- > From: "John Ament" > To: "Antoine Sabot-Durand" , "Martin Kouba" > Cc: "cdi-dev" > Sent: Monday, July 24, 2017 12:09:16 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > Then that means Weld is doing it wrong (firing PAT for all classes). > > > > > John > > From: Antoine Sabot-Durand > Sent: Monday, July 24, 2017 4:31 AM > To: Martin Kouba > Cc: John Ament; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > Yes it?s the correct interpretation. > Confusion may come from the fact that we first considered to specify this > feature the other way around (discover all types on implicites bean archive > but only keep classes with BDA for bean discovery). We switched to this > approach because we thought it was better for backward compatibility. > > Antoine > > > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > > > Hi John, > > > > I think OWB interpretation is correct. > > > > In an implicit bean archive (implicit = bean archive with > > bean-discovery-mode=annotated) PAT is only fired for discovered types > > and the container only discovers each class with a bean defining > > annotation. > > > > For trimmed bean archive - only explicit bean archives may be marked as > > 'trimmed'. PAT is fired there but if it does not have a bean defining > > annotation it's removed from the set of discovered types, i.e. no bean > > is created. > > > > Martin > > > > Dne 23.7.2017 v 14:32 John Ament napsal(a): > >> Hi, > >> > >> > >> An issue popped up in OWB wanted to get the EG's perspective on this. > >> > >> > >> I have a given bean archive, with a class in it (no bean defining > >> annotations). My interpretation of [1] and [2] is that this class is > >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In > >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if > >> it is all, even with a a PAT gets fired. However it seems that > >> it should get fired before anything is even considered about the class, > >> and whether it has annotations. > >> > >> > >> [1]: > >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > > Contexts and Dependency Injection for the Java EE platform > docs.jboss.org > A well-defined lifecycle for stateful objects bound to lifecycle contexts, > where the set of contexts is extensible. A sophisticated, typesafe > dependency injection ... > > > >> > >> [2]: > >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > >> > >> > >> John > >> > >> > >> ------------------------------------------------------------------------ > >> 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 > >> https://lists.jboss.org/mailman/listinfo/cdi-dev > > > cdi-dev Info Page - lists.jboss.org Mailing Lists > lists.jboss.org > List to discuss the development of CDI (the specification) To see the > collection of prior postings to the list, visit the cdi-dev Archives. > > > >> > >> 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 > > Senior 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. > > > 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 > 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. ________________________________ 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/20170724/ad010d65/attachment-0001.html From tremes at redhat.com Mon Jul 24 07:59:14 2017 From: tremes at redhat.com (Tomas Remes) Date: Mon, 24 Jul 2017 07:59:14 -0400 (EDT) Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> Message-ID: <1736383440.18644152.1500897554376.JavaMail.zimbra@redhat.com> DefaultServlet appears to have @Dependent annotation. https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/DefaultServlet.java#L31 T. ----- Original Message ----- From: "John Ament" To: "Matej Novotny" Cc: "cdi-dev" Sent: Monday, July 24, 2017 1:35:16 PM Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode 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. 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 https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java 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. John From: Matej Novotny Sent: Monday, July 24, 2017 6:38 AM To: John Ament Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode What case exactly do you think Weld does incorrectly? If you have beans.xml `all` with ``, you should be firing PAT for all. That's what me and Martin said. Matej ----- Original Message ----- > From: "John Ament" > To: "Antoine Sabot-Durand" , "Martin Kouba" > Cc: "cdi-dev" > Sent: Monday, July 24, 2017 12:09:16 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > Then that means Weld is doing it wrong (firing PAT for all classes). > > > > > John > > From: Antoine Sabot-Durand > Sent: Monday, July 24, 2017 4:31 AM > To: Martin Kouba > Cc: John Ament; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > Yes it?s the correct interpretation. > Confusion may come from the fact that we first considered to specify this > feature the other way around (discover all types on implicites bean archive > but only keep classes with BDA for bean discovery). We switched to this > approach because we thought it was better for backward compatibility. > > Antoine > > > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > > > Hi John, > > > > I think OWB interpretation is correct. > > > > In an implicit bean archive (implicit = bean archive with > > bean-discovery-mode=annotated) PAT is only fired for discovered types > > and the container only discovers each class with a bean defining > > annotation. > > > > For trimmed bean archive - only explicit bean archives may be marked as > > 'trimmed'. PAT is fired there but if it does not have a bean defining > > annotation it's removed from the set of discovered types, i.e. no bean > > is created. > > > > Martin > > > > Dne 23.7.2017 v 14:32 John Ament napsal(a): > >> Hi, > >> > >> > >> An issue popped up in OWB wanted to get the EG's perspective on this. > >> > >> > >> I have a given bean archive, with a class in it (no bean defining > >> annotations). My interpretation of [1] and [2] is that this class is > >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In > >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if > >> it is all, even with a a PAT gets fired. However it seems that > >> it should get fired before anything is even considered about the class, > >> and whether it has annotations. > >> > >> > >> [1]: > >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > > Contexts and Dependency Injection for the Java EE platform > docs.jboss.org > A well-defined lifecycle for stateful objects bound to lifecycle contexts, > where the set of contexts is extensible. A sophisticated, typesafe > dependency injection ... > > > >> > >> [2]: > >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > >> > >> > >> John > >> > >> > >> ------------------------------------------------------------------------ > >> 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 > >> https://lists.jboss.org/mailman/listinfo/cdi-dev > > > cdi-dev Info Page - lists.jboss.org Mailing Lists > lists.jboss.org > List to discuss the development of CDI (the specification) To see the > collection of prior postings to the list, visit the cdi-dev Archives. > > > >> > >> 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 > > Senior 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. > > > 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 > 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. 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 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. -- Tomas Remes From john.ament at spartasystems.com Mon Jul 24 08:49:53 2017 From: john.ament at spartasystems.com (John Ament) Date: Mon, 24 Jul 2017 12:49:53 +0000 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: <1736383440.18644152.1500897554376.JavaMail.zimbra@redhat.com> References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> , <1736383440.18644152.1500897554376.JavaMail.zimbra@redhat.com> Message-ID: Sorry, should have been "DefaultListener" John ________________________________ From: Tomas Remes Sent: Monday, July 24, 2017 7:59 AM To: John Ament Cc: Matej Novotny; cdi-dev Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode DefaultServlet appears to have @Dependent annotation. https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/DefaultServlet.java#L31 T. ----- Original Message ----- From: "John Ament" To: "Matej Novotny" Cc: "cdi-dev" Sent: Monday, July 24, 2017 1:35:16 PM Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode 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. 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 https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java 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. John From: Matej Novotny Sent: Monday, July 24, 2017 6:38 AM To: John Ament Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode What case exactly do you think Weld does incorrectly? If you have beans.xml `all` with ``, you should be firing PAT for all. That's what me and Martin said. Matej ----- Original Message ----- > From: "John Ament" > To: "Antoine Sabot-Durand" , "Martin Kouba" > Cc: "cdi-dev" > Sent: Monday, July 24, 2017 12:09:16 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > Then that means Weld is doing it wrong (firing PAT for all classes). > > > > > John > > From: Antoine Sabot-Durand > Sent: Monday, July 24, 2017 4:31 AM > To: Martin Kouba > Cc: John Ament; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > Yes it?s the correct interpretation. > Confusion may come from the fact that we first considered to specify this > feature the other way around (discover all types on implicites bean archive > but only keep classes with BDA for bean discovery). We switched to this > approach because we thought it was better for backward compatibility. > > Antoine > > > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > > > Hi John, > > > > I think OWB interpretation is correct. > > > > In an implicit bean archive (implicit = bean archive with > > bean-discovery-mode=annotated) PAT is only fired for discovered types > > and the container only discovers each class with a bean defining > > annotation. > > > > For trimmed bean archive - only explicit bean archives may be marked as > > 'trimmed'. PAT is fired there but if it does not have a bean defining > > annotation it's removed from the set of discovered types, i.e. no bean > > is created. > > > > Martin > > > > Dne 23.7.2017 v 14:32 John Ament napsal(a): > >> Hi, > >> > >> > >> An issue popped up in OWB wanted to get the EG's perspective on this. > >> > >> > >> I have a given bean archive, with a class in it (no bean defining > >> annotations). My interpretation of [1] and [2] is that this class is > >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In > >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if > >> it is all, even with a a PAT gets fired. However it seems that > >> it should get fired before anything is even considered about the class, > >> and whether it has annotations. > >> > >> > >> [1]: > >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > > Contexts and Dependency Injection for the Java EE platform > docs.jboss.org > A well-defined lifecycle for stateful objects bound to lifecycle contexts, > where the set of contexts is extensible. A sophisticated, typesafe > dependency injection ... > > > >> > >> [2]: > >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > >> > >> > >> John > >> > >> > >> ------------------------------------------------------------------------ > >> 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 > >> https://lists.jboss.org/mailman/listinfo/cdi-dev > > > cdi-dev Info Page - lists.jboss.org Mailing Lists > lists.jboss.org > List to discuss the development of CDI (the specification) To see the > collection of prior postings to the list, visit the cdi-dev Archives. > > > >> > >> 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 > > Senior 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. > > > 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 > 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. 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 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. -- Tomas Remes ________________________________ 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/20170724/5b50e964/attachment-0001.html From manovotn at redhat.com Mon Jul 24 10:36:33 2017 From: manovotn at redhat.com (Matej Novotny) Date: Mon, 24 Jul 2017 10:36:33 -0400 (EDT) Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> <1736383440.18644152.1500897554376.JavaMail.zimbra@redhat.com> Message-ID: <2114903588.33886767.1500906993552.JavaMail.zimbra@redhat.com> Hi John, I took a look at the Hammock test and I think you are sailing unspecified waters, so to say. You are right that Weld picks up DefaultListener as a bean even without BDA. In spec 2.0 section 26.2, there is this: "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." So in EE, Listeners should be picked up with `annotated` even without having BDA. Now, hammock is using a combination of Weld SE + Servlet right? So the EE isn't your case, but then again spec doesn't talk about servlet at all. Therefore, I would say this is up to implementations to decide. Thoughts,opinions? Matej ----- Original Message ----- > From: "John Ament" > To: "Tomas Remes" > Cc: "Matej Novotny" , "cdi-dev" > Sent: Monday, July 24, 2017 2:49:53 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > Sorry, should have been "DefaultListener" > > > John > > > ________________________________ > From: Tomas Remes > Sent: Monday, July 24, 2017 7:59 AM > To: John Ament > Cc: Matej Novotny; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > DefaultServlet appears to have @Dependent annotation. > > https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/DefaultServlet.java#L31 > > T. > > ----- Original Message ----- > From: "John Ament" > To: "Matej Novotny" > Cc: "cdi-dev" > Sent: Monday, July 24, 2017 1:35:16 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > 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. > > > > > 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 > https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java > 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. > > > > > John > > > > > > > From: Matej Novotny > Sent: Monday, July 24, 2017 6:38 AM > To: John Ament > Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > What case exactly do you think Weld does incorrectly? > > If you have beans.xml `all` with ``, you should be firing PAT for > all. That's what me and Martin said. > > Matej > > ----- Original Message ----- > > From: "John Ament" > > To: "Antoine Sabot-Durand" , "Martin Kouba" > > > > Cc: "cdi-dev" > > Sent: Monday, July 24, 2017 12:09:16 PM > > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > > > > > Then that means Weld is doing it wrong (firing PAT for all classes). > > > > > > > > > > John > > > > From: Antoine Sabot-Durand > > Sent: Monday, July 24, 2017 4:31 AM > > To: Martin Kouba > > Cc: John Ament; cdi-dev > > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > Yes it?s the correct interpretation. > > Confusion may come from the fact that we first considered to specify this > > feature the other way around (discover all types on implicites bean archive > > but only keep classes with BDA for bean discovery). We switched to this > > approach because we thought it was better for backward compatibility. > > > > Antoine > > > > > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > > > > > Hi John, > > > > > > I think OWB interpretation is correct. > > > > > > In an implicit bean archive (implicit = bean archive with > > > bean-discovery-mode=annotated) PAT is only fired for discovered types > > > and the container only discovers each class with a bean defining > > > annotation. > > > > > > For trimmed bean archive - only explicit bean archives may be marked as > > > 'trimmed'. PAT is fired there but if it does not have a bean defining > > > annotation it's removed from the set of discovered types, i.e. no bean > > > is created. > > > > > > Martin > > > > > > Dne 23.7.2017 v 14:32 John Ament napsal(a): > > >> Hi, > > >> > > >> > > >> An issue popped up in OWB wanted to get the EG's perspective on this. > > >> > > >> > > >> I have a given bean archive, with a class in it (no bean defining > > >> annotations). My interpretation of [1] and [2] is that this class is > > >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In > > >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if > > >> it is all, even with a a PAT gets fired. However it seems that > > >> it should get fired before anything is even considered about the class, > > >> and whether it has annotations. > > >> > > >> > > >> [1]: > > >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > > > > > Contexts and Dependency Injection for the Java EE platform > > docs.jboss.org > > A well-defined lifecycle for stateful objects bound to lifecycle contexts, > > where the set of contexts is extensible. A sophisticated, typesafe > > dependency injection ... > > > > > > >> > > >> [2]: > > >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > > >> > > >> > > >> John > > >> > > >> > > >> ------------------------------------------------------------------------ > > >> 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 > > >> https://lists.jboss.org/mailman/listinfo/cdi-dev > > > > > > cdi-dev Info Page - lists.jboss.org Mailing Lists > > lists.jboss.org > > List to discuss the development of CDI (the specification) To see the > > collection of prior postings to the list, visit the cdi-dev Archives. > > > > > > >> > > >> 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 > > > Senior 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. > > > > > > 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 > > 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. > > 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 > 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. > > -- > Tomas Remes > > > ________________________________ > 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. > From john.ament at spartasystems.com Mon Jul 24 10:59:19 2017 From: john.ament at spartasystems.com (John Ament) Date: Mon, 24 Jul 2017 14:59:19 +0000 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: <2114903588.33886767.1500906993552.JavaMail.zimbra@redhat.com> References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> <1736383440.18644152.1500897554376.JavaMail.zimbra@redhat.com> , <2114903588.33886767.1500906993552.JavaMail.zimbra@redhat.com> Message-ID: In this specific case, that may be what's happening. I also am seeing it on Entity classes. John D. Ament Cloud Software Architect Sparta Systems p. 609.807.5466 | m. 609.553.6130 john.ament at spartasystems.com | www.spartasystems.com ________________________________ From: Matej Novotny Sent: Monday, July 24, 2017 10:36 AM To: John Ament Cc: Tomas Remes; cdi-dev Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode Hi John, I took a look at the Hammock test and I think you are sailing unspecified waters, so to say. You are right that Weld picks up DefaultListener as a bean even without BDA. In spec 2.0 section 26.2, there is this: "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." So in EE, Listeners should be picked up with `annotated` even without having BDA. Now, hammock is using a combination of Weld SE + Servlet right? So the EE isn't your case, but then again spec doesn't talk about servlet at all. Therefore, I would say this is up to implementations to decide. Thoughts,opinions? Matej ----- Original Message ----- > From: "John Ament" > To: "Tomas Remes" > Cc: "Matej Novotny" , "cdi-dev" > Sent: Monday, July 24, 2017 2:49:53 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > Sorry, should have been "DefaultListener" > > > John > > > ________________________________ > From: Tomas Remes > Sent: Monday, July 24, 2017 7:59 AM > To: John Ament > Cc: Matej Novotny; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > DefaultServlet appears to have @Dependent annotation. > > https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/DefaultServlet.java#L31 > > T. > > ----- Original Message ----- > From: "John Ament" > To: "Matej Novotny" > Cc: "cdi-dev" > Sent: Monday, July 24, 2017 1:35:16 PM > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > 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. > > > > > 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 > https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java > 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. > > > > > John > > > > > > > From: Matej Novotny > Sent: Monday, July 24, 2017 6:38 AM > To: John Ament > Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > What case exactly do you think Weld does incorrectly? > > If you have beans.xml `all` with ``, you should be firing PAT for > all. That's what me and Martin said. > > Matej > > ----- Original Message ----- > > From: "John Ament" > > To: "Antoine Sabot-Durand" , "Martin Kouba" > > > > Cc: "cdi-dev" > > Sent: Monday, July 24, 2017 12:09:16 PM > > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > > > > > > > Then that means Weld is doing it wrong (firing PAT for all classes). > > > > > > > > > > John > > > > From: Antoine Sabot-Durand > > Sent: Monday, July 24, 2017 4:31 AM > > To: Martin Kouba > > Cc: John Ament; cdi-dev > > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > > Yes it?s the correct interpretation. > > Confusion may come from the fact that we first considered to specify this > > feature the other way around (discover all types on implicites bean archive > > but only keep classes with BDA for bean discovery). We switched to this > > approach because we thought it was better for backward compatibility. > > > > Antoine > > > > > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : > > > > > > Hi John, > > > > > > I think OWB interpretation is correct. > > > > > > In an implicit bean archive (implicit = bean archive with > > > bean-discovery-mode=annotated) PAT is only fired for discovered types > > > and the container only discovers each class with a bean defining > > > annotation. > > > > > > For trimmed bean archive - only explicit bean archives may be marked as > > > 'trimmed'. PAT is fired there but if it does not have a bean defining > > > annotation it's removed from the set of discovered types, i.e. no bean > > > is created. > > > > > > Martin > > > > > > Dne 23.7.2017 v 14:32 John Ament napsal(a): > > >> Hi, > > >> > > >> > > >> An issue popped up in OWB wanted to get the EG's perspective on this. > > >> > > >> > > >> I have a given bean archive, with a class in it (no bean defining > > >> annotations). My interpretation of [1] and [2] is that this class is > > >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In > > >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if > > >> it is all, even with a a PAT gets fired. However it seems that > > >> it should get fired before anything is even considered about the class, > > >> and whether it has annotations. > > >> > > >> > > >> [1]: > > >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type > > > > > > Contexts and Dependency Injection for the Java EE platform > > docs.jboss.org > > A well-defined lifecycle for stateful objects bound to lifecycle contexts, > > where the set of contexts is extensible. A sophisticated, typesafe > > dependency injection ... > > > > > > >> > > >> [2]: > > >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type > > >> > > >> > > >> John > > >> > > >> > > >> ------------------------------------------------------------------------ > > >> 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 > > >> https://lists.jboss.org/mailman/listinfo/cdi-dev > > > > > > cdi-dev Info Page - lists.jboss.org Mailing Lists > > lists.jboss.org > > List to discuss the development of CDI (the specification) To see the > > collection of prior postings to the list, visit the cdi-dev Archives. > > > > > > >> > > >> 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 > > > Senior 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. > > > > > > 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 > > 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. > > 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 > 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. > > -- > Tomas Remes > > > ________________________________ > 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. > ________________________________ 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/20170724/752df8f6/attachment-0001.html From mkouba at redhat.com Tue Jul 25 02:56:13 2017 From: mkouba at redhat.com (Martin Kouba) Date: Tue, 25 Jul 2017 08:56:13 +0200 Subject: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode In-Reply-To: References: <8f37b3ca-4196-ce96-c25f-d72f1b1d2641@redhat.com> <64DDB0A7-ECC0-491E-97FC-C02A0415EA11@redhat.com> <126316856.33788282.1500892685240.JavaMail.zimbra@redhat.com> <1736383440.18644152.1500897554376.JavaMail.zimbra@redhat.com> <2114903588.33886767.1500906993552.JavaMail.zimbra@redhat.com> Message-ID: This is a problem of the test environment. Hammock tests are using arquillian-weld-embedded which does NOT support implicit bean archives (it's using flat deployment structure). I.e. Weld-specific Bootstrapper is not used at all. Instead, Weld is started within org.jboss.arquillian.container.weld.embedded.WeldMockContainer.deploy(). I believe that arquillian-container-se [1] would be a better match for such test cases. Martin [1] https://github.com/arquillian/arquillian-container-se Dne 24.7.2017 v 16:59 John Ament napsal(a): > In this specific case, that may be what's happening. I also am seeing > it on Entity classes. > > > John D. Ament > Cloud Software Architect** > > Sparta Systems > > p. 609.807.5466 |m.609.553.6130 > > john.ament at spartasystems.com > |www.spartasystems.com > > > > > > > ------------------------------------------------------------------------ > *From:* Matej Novotny > *Sent:* Monday, July 24, 2017 10:36 AM > *To:* John Ament > *Cc:* Tomas Remes; cdi-dev > *Subject:* Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode > Hi John, > > I took a look at the Hammock test and I think you are sailing > unspecified waters, so to say. > You are right that Weld picks up DefaultListener as a bean even without BDA. > > In spec 2.0 section 26.2, there is this: > "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." > > So in EE, Listeners should be picked up with `annotated` even without > having BDA. > > Now, hammock is using a combination of Weld SE + Servlet right? > So the EE isn't your case, but then again spec doesn't talk about > servlet at all. > Therefore, I would say this is up to implementations to decide. > > Thoughts,opinions? > > Matej > > ----- Original Message ----- >> From: "John Ament" >> To: "Tomas Remes" >> Cc: "Matej Novotny" , "cdi-dev" >> Sent: Monday, July 24, 2017 2:49:53 PM >> Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode >> >> Sorry, should have been "DefaultListener" >> >> >> John >> >> >> ________________________________ >> From: Tomas Remes >> Sent: Monday, July 24, 2017 7:59 AM >> To: John Ament >> Cc: Matej Novotny; cdi-dev >> Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode >> >> >> DefaultServlet appears to have @Dependent annotation. >> >> https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/DefaultServlet.java#L31 >> >> T. >> >> ----- Original Message ----- >> From: "John Ament" >> To: "Matej Novotny" >> Cc: "cdi-dev" >> Sent: Monday, July 24, 2017 1:35:16 PM >> Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode >> >> >> >> 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. >> >> >> >> >> 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 >> https://github.com/hammock-project/hammock/blob/hammock-1.5/web-tck/src/main/java/ws/ament/hammock/web/tck/ServletTest.java >> 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. >> >> >> >> >> John >> >> >> >> >> >> >> From: Matej Novotny >> Sent: Monday, July 24, 2017 6:38 AM >> To: John Ament >> Cc: Antoine Sabot-Durand; Martin Kouba; cdi-dev >> Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode >> What case exactly do you think Weld does incorrectly? >> >> If you have beans.xml `all` with ``, you should be firing PAT for >> all. That's what me and Martin said. >> >> Matej >> >> ----- Original Message ----- >> > From: "John Ament" >> > To: "Antoine Sabot-Durand" , "Martin Kouba" >> > >> > Cc: "cdi-dev" >> > Sent: Monday, July 24, 2017 12:09:16 PM >> > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode >> > >> > >> > >> > Then that means Weld is doing it wrong (firing PAT for all classes). >> > >> > >> > >> > >> > John >> > >> > From: Antoine Sabot-Durand >> > Sent: Monday, July 24, 2017 4:31 AM >> > To: Martin Kouba >> > Cc: John Ament; cdi-dev >> > Subject: Re: [cdi-dev] ProcessAnnotatedType & Bean Discovery mode >> > Yes it?s the correct interpretation. >> > Confusion may come from the fact that we first considered to specify this >> > feature the other way around (discover all types on implicites bean archive >> > but only keep classes with BDA for bean discovery). We switched to this >> > approach because we thought it was better for backward compatibility. >> > >> > Antoine >> > >> > > Le 24 juil. 2017 ? 08:27, Martin Kouba a ?crit : >> > > >> > > Hi John, >> > > >> > > I think OWB interpretation is correct. >> > > >> > > In an implicit bean archive (implicit = bean archive with >> > > bean-discovery-mode=annotated) PAT is only fired for discovered types >> > > and the container only discovers each class with a bean defining >> > > annotation. >> > > >> > > For trimmed bean archive - only explicit bean archives may be marked as >> > > 'trimmed'. PAT is fired there but if it does not have a bean defining >> > > annotation it's removed from the set of discovered types, i.e. no bean >> > > is created. >> > > >> > > Martin >> > > >> > > Dne 23.7.2017 v 14:32 John Ament napsal(a): >> > >> Hi, >> > >> >> > >> >> > >> An issue popped up in OWB wanted to get the EG's perspective on this. >> > >> >> > >> >> > >> I have a given bean archive, with a class in it (no bean defining >> > >> annotations). My interpretation of [1] and [2] is that this class is >> > >> fired as a ProcessAnnotatedType, regardless of what is in beans.xml. In >> > >> OWB, if I do bean-discovery-mode=annotated it does not get fired, but if >> > >> it is all, even with a a PAT gets fired. However it seems that >> > >> it should get fired before anything is even considered about the class, >> > >> and whether it has annotations. >> > >> >> > >> >> > >> [1]: >> > >> https://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#process_annotated_type >> > >> > >> > Contexts and Dependency Injection for the Java EE platform >> > docs.jboss.org >> > A well-defined lifecycle for stateful objects bound to lifecycle contexts, >> > where the set of contexts is extensible. A sophisticated, typesafe >> > dependency injection ... >> > >> > >> > >> >> > >> [2]: >> > >> https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#process_annotated_type >> > >> >> > >> >> > >> John >> > >> >> > >> >> > >> ------------------------------------------------------------------------ >> > >> 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 >> > >> https://lists.jboss.org/mailman/listinfo/cdi-dev >> > >> > >> > cdi-dev Info Page - lists.jboss.org Mailing Lists >> > lists.jboss.org >> > List to discuss the development of CDI (the specification) To see the >> > collection of prior postings to the list, visit the cdi-dev Archives. >> > >> > >> > >> >> > >> 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 >> > > Senior 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. >> > >> > >> > 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 >> > 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. >> >> 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 >> 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. >> >> -- >> Tomas Remes >> >> >> ________________________________ >> 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. >> > ------------------------------------------------------------------------ > 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 > 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 Senior Software Engineer Red Hat, Czech Republic From tremes at redhat.com Thu Jul 27 02:18:31 2017 From: tremes at redhat.com (Tomas Remes) Date: Thu, 27 Jul 2017 02:18:31 -0400 (EDT) Subject: [cdi-dev] new CDI TCK lead In-Reply-To: <183734311.18858695.1500975269158.JavaMail.zimbra@redhat.com> Message-ID: <15327093.19303363.1501136311782.JavaMail.zimbra@redhat.com> Hi all, Starting from 1st of August Matej Novotny will take over the CDI TCK lead role from me. I am moving to another project and I believe Matej is well known to CDI/CDITCK/Weld contributors and will be good and responsible lead. I wish him good luck and have some fun! Thanks -- Tomas Remes From mkouba at redhat.com Thu Jul 27 03:24:17 2017 From: mkouba at redhat.com (Martin Kouba) Date: Thu, 27 Jul 2017 09:24:17 +0200 Subject: [cdi-dev] new CDI TCK lead In-Reply-To: <15327093.19303363.1501136311782.JavaMail.zimbra@redhat.com> References: <15327093.19303363.1501136311782.JavaMail.zimbra@redhat.com> Message-ID: <2e62878a-aac1-5e58-77ee-12f5c0925ef4@redhat.com> Tom, thanks for your great work! CDI/TCK/Weld team will be missing you. Best of luck and stay in touch ;-) Matej, congrats to the new role! ;-) Martin Dne 27.7.2017 v 08:18 Tomas Remes napsal(a): > > Hi all, > > Starting from 1st of August Matej Novotny will take over the CDI TCK lead role from me. I am moving to another project and I believe Matej is well known to CDI/CDITCK/Weld contributors and will be good and responsible lead. I wish him good luck and have some fun! > > Thanks > From asd at redhat.com Thu Jul 27 05:55:36 2017 From: asd at redhat.com (Antoine Sabot-Durand) Date: Thu, 27 Jul 2017 09:55:36 +0000 Subject: [cdi-dev] [cdi-tck] new CDI TCK lead In-Reply-To: <2e62878a-aac1-5e58-77ee-12f5c0925ef4@redhat.com> References: <15327093.19303363.1501136311782.JavaMail.zimbra@redhat.com> <2e62878a-aac1-5e58-77ee-12f5c0925ef4@redhat.com> Message-ID: Tom, many thanks for your help and hard work on one of the best Java EE TCK. Good luck for your new role. Matej, congratulation for this new position. Antoine On Thu, Jul 27, 2017 at 11:38 AM Martin Kouba wrote: > Tom, thanks for your great work! CDI/TCK/Weld team will be missing you. > Best of luck and stay in touch ;-) > > Matej, congrats to the new role! ;-) > > Martin > > Dne 27.7.2017 v 08:18 Tomas Remes napsal(a): > > > > Hi all, > > > > Starting from 1st of August Matej Novotny will take over the CDI TCK > lead role from me. I am moving to another project and I believe Matej is > well known to CDI/CDITCK/Weld contributors and will be good and responsible > lead. I wish him good luck and have some fun! > > > > Thanks > > > _______________________________________________ > cdi-tck mailing list > cdi-tck at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/cdi-tck > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170727/22efe4bc/attachment.html From manovotn at redhat.com Fri Jul 28 03:47:28 2017 From: manovotn at redhat.com (Matej Novotny) Date: Fri, 28 Jul 2017 03:47:28 -0400 (EDT) Subject: [cdi-dev] [cdi-tck] new CDI TCK lead In-Reply-To: References: <15327093.19303363.1501136311782.JavaMail.zimbra@redhat.com> <2e62878a-aac1-5e58-77ee-12f5c0925ef4@redhat.com> Message-ID: <827831215.35637868.1501228048818.JavaMail.zimbra@redhat.com> Tomas, it has been a great experience and fun working with you. I wish you the best of luck in your new role and may the odds be ever in your favor. I shall endeavor to fulfill the TCK lead role as best I can. Matej ----- Original Message ----- > From: "Antoine Sabot-Durand" > To: "Martin Kouba" , "Tomas Remes" , "cdi-dev" > Cc: "cdi-tck" > Sent: Thursday, July 27, 2017 11:55:36 AM > Subject: Re: [cdi-dev] [cdi-tck] new CDI TCK lead > > Tom, many thanks for your help and hard work on one of the best Java EE TCK. > Good luck for your new role. > > Matej, congratulation for this new position. > > Antoine > > On Thu, Jul 27, 2017 at 11:38 AM Martin Kouba < mkouba at redhat.com > wrote: > > > Tom, thanks for your great work! CDI/TCK/Weld team will be missing you. > Best of luck and stay in touch ;-) > > Matej, congrats to the new role! ;-) > > Martin > > Dne 27.7.2017 v 08:18 Tomas Remes napsal(a): > > > > Hi all, > > > > Starting from 1st of August Matej Novotny will take over the CDI TCK lead > > role from me. I am moving to another project and I believe Matej is well > > known to CDI/CDITCK/Weld contributors and will be good and responsible > > lead. I wish him good luck and have some fun! > > > > Thanks > > > _______________________________________________ > cdi-tck mailing list > cdi-tck at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/cdi-tck > > _______________________________________________ > 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. From struberg at yahoo.de Fri Jul 28 07:15:42 2017 From: struberg at yahoo.de (Mark Struberg) Date: Fri, 28 Jul 2017 13:15:42 +0200 Subject: [cdi-dev] [cdi-tck] new CDI TCK lead In-Reply-To: <827831215.35637868.1501228048818.JavaMail.zimbra@redhat.com> References: <15327093.19303363.1501136311782.JavaMail.zimbra@redhat.com> <2e62878a-aac1-5e58-77ee-12f5c0925ef4@redhat.com> <827831215.35637868.1501228048818.JavaMail.zimbra@redhat.com> Message-ID: Hi Tomas! Thanks for the great job you (and also the others) did on the TCK. Hope you can still be around on our next f2f meetings in Brno! And Matej, congratulations to your promotion and see you soon! LieGrue, strub > Am 28.07.2017 um 09:47 schrieb Matej Novotny : > > Tomas, > > it has been a great experience and fun working with you. > I wish you the best of luck in your new role and may the odds be ever in your favor. > > I shall endeavor to fulfill the TCK lead role as best I can. > > Matej > > ----- Original Message ----- >> From: "Antoine Sabot-Durand" >> To: "Martin Kouba" , "Tomas Remes" , "cdi-dev" >> Cc: "cdi-tck" >> Sent: Thursday, July 27, 2017 11:55:36 AM >> Subject: Re: [cdi-dev] [cdi-tck] new CDI TCK lead >> >> Tom, many thanks for your help and hard work on one of the best Java EE TCK. >> Good luck for your new role. >> >> Matej, congratulation for this new position. >> >> Antoine >> >> On Thu, Jul 27, 2017 at 11:38 AM Martin Kouba < mkouba at redhat.com > wrote: >> >> >> Tom, thanks for your great work! CDI/TCK/Weld team will be missing you. >> Best of luck and stay in touch ;-) >> >> Matej, congrats to the new role! ;-) >> >> Martin >> >> Dne 27.7.2017 v 08:18 Tomas Remes napsal(a): >>> >>> Hi all, >>> >>> Starting from 1st of August Matej Novotny will take over the CDI TCK lead >>> role from me. I am moving to another project and I believe Matej is well >>> known to CDI/CDITCK/Weld contributors and will be good and responsible >>> lead. I wish him good luck and have some fun! >>> >>> Thanks >>> >> _______________________________________________ >> cdi-tck mailing list >> cdi-tck at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/cdi-tck >> >> _______________________________________________ >> 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. > _______________________________________________ > 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.