From rinsvind at gmail.com Fri Sep 1 03:51:47 2017 From: rinsvind at gmail.com (Todor Boev) Date: Fri, 1 Sep 2017 10:51:47 +0300 Subject: [cdi-dev] Attributes on scope annotations Message-ID: Hello, Is it against the CDI 2.0 specification to have attributes on a scope annotation? If not is this a corner case that may become forbidden or simply not be taken into account in future versions of the specification? E.g. @ComponentScoped("my-component") With Weld 3.0.0 I was able to successfully use such annotations. Regards, Todor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170901/11ea6bb8/attachment.html From manovotn at redhat.com Fri Sep 1 04:49:04 2017 From: manovotn at redhat.com (Matej Novotny) Date: Fri, 1 Sep 2017 04:49:04 -0400 (EDT) Subject: [cdi-dev] Attributes on scope annotations In-Reply-To: References: Message-ID: <774149744.4238668.1504255744039.JavaMail.zimbra@redhat.com> Hello Todor, >From CDI specification 2.0 section 2.4.2 Defining new scopes[1]: "A scope type must not have any attributes. If a scope type has attributes non-portable behavior results." Matej ___________________________________________________________________________- [1] http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#defining_new_scope_type ----- Original Message ----- > From: "Todor Boev" > To: cdi-dev at lists.jboss.org > Sent: Friday, September 1, 2017 9:51:47 AM > Subject: [cdi-dev] Attributes on scope annotations > > Hello, > > Is it against the CDI 2.0 specification to have attributes on a scope > annotation? If not is this a corner case that may become forbidden or simply > not be taken into account in future versions of the specification? > > E.g. @ComponentScoped("my-component") > > With Weld 3.0.0 I was able to successfully use such annotations. > > Regards, > Todor > > > _______________________________________________ > 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 mkouba at redhat.com Fri Sep 1 04:50:56 2017 From: mkouba at redhat.com (Martin Kouba) Date: Fri, 1 Sep 2017 10:50:56 +0200 Subject: [cdi-dev] Attributes on scope annotations In-Reply-To: References: Message-ID: <76ae04ea-12e4-f3fe-702c-f80d8b598912@redhat.com> Hi Todor, it's not forbidden but defined as non-portable behavior, i.e. it depends on implementation whether it will ignore the attributes, throw DeploymentException, etc. For Weld the attributes should be ignored. Just try OWB and if ok then you're probably safe to go ;-) Martin Dne 1.9.2017 v 09:51 Todor Boev napsal(a): > Hello, > > Is it against the CDI 2.0 specification to have attributes on a scope > annotation? If not is this a corner case that may become forbidden or > simply not be taken into account in future versions of the specification? > > E.g. @ComponentScoped("my-component") > > With Weld 3.0.0 I was able to successfully use such annotations. > > Regards, > Todor > > > > _______________________________________________ > 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 Fri Sep 1 07:43:43 2017 From: manovotn at redhat.com (Matej Novotny) Date: Fri, 1 Sep 2017 07:43:43 -0400 (EDT) Subject: [cdi-dev] Attributes on scope annotations In-Reply-To: References: <774149744.4238668.1504255744039.JavaMail.zimbra@redhat.com> Message-ID: <348897407.4268818.1504266223255.JavaMail.zimbra@redhat.com> Let's keep this conversation on CDI-dev list, please (adding back to CC). Hmm, I think it is not forbidden to add another plain java annotation. However, having it working as scope and cdi qualifier in the same time won't work. Matej ----- Original Message ----- > From: "Todor Boev" > To: "Matej Novotny" > Sent: Friday, September 1, 2017 12:33:54 PM > Subject: Re: [cdi-dev] Attributes on scope annotations > > Thank you for the timely replay, > > I need portable behavior, so the other option I am considering is to > meta-annotate the scope annotation with the additional information I need. > The issues are now: is this allowed, can in principle my custom > meta-annotation be a qualifier. Probably a plain annotation will be > sufficient, but I may need to have it do double-duty as a qualifier as well. > > Thanks in advance, > Todor > > On Fri, Sep 1, 2017 at 11:49 AM, Matej Novotny wrote: > > > Hello Todor, > > > > From CDI specification 2.0 section 2.4.2 Defining new scopes[1]: > > > > "A scope type must not have any attributes. If a scope type has attributes > > non-portable behavior results." > > > > Matej > > > > ____________________________________________________________ > > _______________- > > [1] http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html# > > defining_new_scope_type > > > > > > > > ----- Original Message ----- > > > From: "Todor Boev" > > > To: cdi-dev at lists.jboss.org > > > Sent: Friday, September 1, 2017 9:51:47 AM > > > Subject: [cdi-dev] Attributes on scope annotations > > > > > > Hello, > > > > > > Is it against the CDI 2.0 specification to have attributes on a scope > > > annotation? If not is this a corner case that may become forbidden or > > simply > > > not be taken into account in future versions of the specification? > > > > > > E.g. @ComponentScoped("my-component") > > > > > > With Weld 3.0.0 I was able to successfully use such annotations. > > > > > > Regards, > > > Todor > > > > > > > > > _______________________________________________ > > > 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 kalgon at hotmail.com Sat Sep 2 06:08:41 2017 From: kalgon at hotmail.com (Xavier Dury) Date: Sat, 2 Sep 2017 10:08:41 +0000 Subject: [cdi-dev] Attributes on scope annotations In-Reply-To: <348897407.4268818.1504266223255.JavaMail.zimbra@redhat.com> References: <774149744.4238668.1504255744039.JavaMail.zimbra@redhat.com> , <348897407.4268818.1504266223255.JavaMail.zimbra@redhat.com> Message-ID: JSF [1] and Omnifaces [2] are doing it but it's against the spec. If this was allowed, I suppose BeanManager.getContext() [3] would have taken an annotation parameter instead of an annotation type. Xavier ---- [1] http://docs.oracle.com/javaee/7/api/javax/faces/flow/FlowScoped.html [2] http://omnifaces.org/docs/javadoc/2.6/org/omnifaces/cdi/ViewScoped.html [3] http://docs.oracle.com/javaee/7/api/javax/enterprise/inject/spi/BeanManager.html#getContext-java.lang.Class- From: cdi-dev-bounces at lists.jboss.org on behalf of Matej Novotny Sent: Friday, September 1, 2017 1:43 PM To: Todor Boev Cc: cdi-dev Subject: Re: [cdi-dev] Attributes on scope annotations ? Let's keep this conversation on CDI-dev list, please (adding back to CC). Hmm, I think it is not forbidden to add another plain java annotation. However, having it working as scope and cdi qualifier in the same time won't work. Matej ----- Original Message ----- > From: "Todor Boev" > To: "Matej Novotny" > Sent: Friday, September 1, 2017 12:33:54 PM > Subject: Re: [cdi-dev] Attributes on scope annotations > > Thank you for the timely replay, > > I need portable behavior, so the other option I am considering is to > meta-annotate the scope annotation with the additional information I need. > The issues are now: is this allowed, can in principle my custom > meta-annotation be a qualifier. Probably a plain annotation will be > sufficient, but I may need to have it do double-duty as a qualifier as well. > > Thanks in advance, > Todor > > On Fri, Sep 1, 2017 at 11:49 AM, Matej Novotny wrote: > > > Hello Todor, > > > > From CDI specification 2.0 section 2.4.2 Defining new scopes[1]: > > > > "A scope type must not have any attributes. If a scope type has attributes > > non-portable behavior results." > > > > Matej > > > > ____________________________________________________________ > > _______________- > > [1] http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html# JSR 365: Contexts and Dependency Injection for Java 2.0 docs.jboss.org Starting with version 2.0 CDI targets Java SE and Java EE platforms. CDI in Java SE and CDI in a Java EE container share the features defined in core CDI. > > defining_new_scope_type > > > > > > > > ----- Original Message ----- > > > From: "Todor Boev" > > > To: cdi-dev at lists.jboss.org > > > Sent: Friday, September 1, 2017 9:51:47 AM > > > Subject: [cdi-dev] Attributes on scope annotations > > > > > > Hello, > > > > > > Is it against the CDI 2.0 specification to have attributes on a scope > > > annotation? If not is this a corner case that may become forbidden or > > simply > > > not be taken into account in future versions of the specification? > > > > > > E.g. @ComponentScoped("my-component") > > > > > > With Weld 3.0.0 I was able to successfully use such annotations. > > > > > > Regards, > > > Todor > > > > > > > > > _______________________________________________ > > > 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 Apache License, Version 2.0 www.apache.org Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION. 1. Definitions. > > > 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 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. From issues at jboss.org Sat Sep 2 08:57:00 2017 From: issues at jboss.org (John Ament (JIRA)) Date: Sat, 2 Sep 2017 08:57:00 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-714) No way to access the underlying bean in a producer when using BeanConfigurator In-Reply-To: References: Message-ID: John Ament created CDI-714: ------------------------------ Summary: No way to access the underlying bean in a producer when using BeanConfigurator Key: CDI-714 URL: https://issues.jboss.org/browse/CDI-714 Project: CDI Specification Issues Issue Type: Feature Request Reporter: John Ament I was reusing an example the Weld guys pointed me at. {code} InjectionPoint ip = (InjectionPoint)bm.getInjectableReference(new EmptyInjectionPoint(be...), cc); {code} The problem is that I'm using the configurator to create the bean, and the resulting function for the producer doesn't have access to the bean that was created. {code} abd.addBean() .addQualifiers(new ClaimLiteral("", Claims.UNKNOWN)) .addType(type) .scope(Dependent.class) .createWith(ClaimProducer.INSTANCE); {code} So because of this, I have no way to get the injection point. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 04:14:01 2017 From: issues at jboss.org (Martin Kouba (JIRA)) Date: Mon, 4 Sep 2017 04:14:01 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-714) No way to access the underlying bean in a producer when using BeanConfigurator In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457947#comment-13457947 ] Martin Kouba commented on CDI-714: ---------------------------------- That's a good point. However, note that configurators were not designed to completely replace the original methods and to cover every possible case but to help with most common tasks. In this case, it seems the only way to use the {{getInjectableReference()}} workaround would be to lookup the bean inside the callback function. > No way to access the underlying bean in a producer when using BeanConfigurator > ------------------------------------------------------------------------------ > > Key: CDI-714 > URL: https://issues.jboss.org/browse/CDI-714 > Project: CDI Specification Issues > Issue Type: Feature Request > Reporter: John Ament > > I was reusing an example the Weld guys pointed me at. > {code} > InjectionPoint ip = (InjectionPoint)bm.getInjectableReference(new EmptyInjectionPoint(be...), cc); > {code} > The problem is that I'm using the configurator to create the bean, and the resulting function for the producer doesn't have access to the bean that was created. > {code} > abd.addBean() > .addQualifiers(new ClaimLiteral("", Claims.UNKNOWN)) > .addType(type) > .scope(Dependent.class) > .createWith(ClaimProducer.INSTANCE); > {code} > So because of this, I have no way to get the injection point. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 06:04:00 2017 From: issues at jboss.org (Martin Kouba (JIRA)) Date: Mon, 4 Sep 2017 06:04:00 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-715) Transitive stereotype declarations - clarify conflicting scopes In-Reply-To: References: Message-ID: Martin Kouba created CDI-715: -------------------------------- Summary: Transitive stereotype declarations - clarify conflicting scopes Key: CDI-715 URL: https://issues.jboss.org/browse/CDI-715 Project: CDI Specification Issues Issue Type: Clarification Reporter: Martin Kouba Priority: Minor Stereotype declarations are transitive. However, the spec is not clear what happens if a stereotype declares a default scope and also a second stereotype which also declares a default scope. Only _"If a stereotype declares more than one scope, the container automatically detects the problem and treats it as a definition error."_ is defined. Weld currently does merge the stereotypes and throws {{DefinitionException}} if NOT all stereotypes specify the same scope _and_ the bean does NOT declare a scope (this makes sense imho). Note that this is not a problem for {{@Named}}, {{@Alternative}} and interceptor bindings. Any {{@Alternative}} makes a bean an alternative. Any {{@Named}} means the name is defaulted. All bindings are added to the set. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 06:59:00 2017 From: issues at jboss.org (Martin Kouba (JIRA)) Date: Mon, 4 Sep 2017 06:59:00 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-715) Transitive stereotype declarations - clarify conflicting default scopes In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Kouba updated CDI-715: ----------------------------- Summary: Transitive stereotype declarations - clarify conflicting default scopes (was: Transitive stereotype declarations - clarify conflicting scopes) > Transitive stereotype declarations - clarify conflicting default scopes > ----------------------------------------------------------------------- > > Key: CDI-715 > URL: https://issues.jboss.org/browse/CDI-715 > Project: CDI Specification Issues > Issue Type: Clarification > Reporter: Martin Kouba > Priority: Minor > > Stereotype declarations are transitive. However, the spec is not clear what happens if a stereotype declares a default scope and also a second stereotype which also declares a default scope. Only _"If a stereotype declares more than one scope, the container automatically detects the problem and treats it as a definition error."_ is defined. > > Weld currently does merge the stereotypes and throws {{DefinitionException}} if NOT all stereotypes specify the same scope _and_ the bean does NOT declare a scope (this makes sense imho). > Note that this is not a problem for {{@Named}}, {{@Alternative}} and interceptor bindings. > Any {{@Alternative}} makes a bean an alternative. Any {{@Named}} means the name is defaulted. All bindings are added to the set. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 07:55:00 2017 From: issues at jboss.org (Matej Novotny (JIRA)) Date: Mon, 4 Sep 2017 07:55:00 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-716) Allow to recognize custom Bean at runtime In-Reply-To: References: Message-ID: Matej Novotny created CDI-716: --------------------------------- Summary: Allow to recognize custom Bean at runtime Key: CDI-716 URL: https://issues.jboss.org/browse/CDI-716 Project: CDI Specification Issues Issue Type: Feature Request Components: Beans Affects Versions: 2.0 .Final Reporter: Matej Novotny At the moment, they only way to tell custom bean (created via {{BeanConfigurator}} or class implementing {{javax.enterprise.inject.spi.Bean}}) from "standard" one is to have an extension and listen to {{ProcessSyntheticBean}}. This is good enough if it's sufficient to tell the difference at bootstrap time. However, at runtime, there is no way to do this. We could add a method to {{javax.enterprise.inject.spi.Bean}} which would allow to tell the difference. The name of the method could be {{isCustom()}} or {{getKind()}}. Generally, there should be no need to differentiate between custom/standard beans, but when digging deeper, it doesn't hurt to know. Putting this into {{Bean}} interface keeps it deep enough while still giving the information. One of the use cases for this would be CDI-194, which could be "nicely" implemented (avoiding {{null}} values), if there was a way to recognize custom bean. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 08:04:00 2017 From: issues at jboss.org (Matej Novotny (JIRA)) Date: Mon, 4 Sep 2017 08:04:00 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-194) Allow AnnotatedType for a given Bean to be obtained In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458130#comment-13458130 ] Matej Novotny commented on CDI-194: ----------------------------------- I think we should re-open discussion on this issue for 2.1 The use case Stuart explained still makes sense and is a lackluster in CDI. Also, with CDI-716 we would be able to tell custom beans from "normal" ones, hence making this a bit cleaner. > Allow AnnotatedType for a given Bean to be obtained > --------------------------------------------------- > > Key: CDI-194 > URL: https://issues.jboss.org/browse/CDI-194 > Project: CDI Specification Issues > Issue Type: Feature Request > Components: Portable Extensions > Affects Versions: 1.0 > Reporter: Jozef Hartinger > Fix For: TBD > > > See Stuart's comment on CDI-83. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 08:06:01 2017 From: issues at jboss.org (Matej Novotny (JIRA)) Date: Mon, 4 Sep 2017 08:06:01 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-194) Allow AnnotatedType for a given Bean to be obtained In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458130#comment-13458130 ] Matej Novotny edited comment on CDI-194 at 9/4/17 8:05 AM: ----------------------------------------------------------- I think we should re-open discussion on this issue for 2.1 The use case Stuart explained still makes sense and remains unresolved in CDI. Also, with CDI-716 we would be able to tell custom beans from "normal" ones, hence making this a bit cleaner. was (Author: manovotn): I think we should re-open discussion on this issue for 2.1 The use case Stuart explained still makes sense and is a lackluster in CDI. Also, with CDI-716 we would be able to tell custom beans from "normal" ones, hence making this a bit cleaner. > Allow AnnotatedType for a given Bean to be obtained > --------------------------------------------------- > > Key: CDI-194 > URL: https://issues.jboss.org/browse/CDI-194 > Project: CDI Specification Issues > Issue Type: Feature Request > Components: Portable Extensions > Affects Versions: 1.0 > Reporter: Jozef Hartinger > Fix For: TBD > > > See Stuart's comment on CDI-83. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 08:26:02 2017 From: issues at jboss.org (Matej Novotny (JIRA)) Date: Mon, 4 Sep 2017 08:26:02 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-194) Allow AnnotatedType for a given Bean to be obtained In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matej Novotny updated CDI-194: ------------------------------ Fix Version/s: 2.1 (Discussion) (was: TBD) > Allow AnnotatedType for a given Bean to be obtained > --------------------------------------------------- > > Key: CDI-194 > URL: https://issues.jboss.org/browse/CDI-194 > Project: CDI Specification Issues > Issue Type: Feature Request > Components: Portable Extensions > Affects Versions: 1.0 > Reporter: Jozef Hartinger > Fix For: 2.1 (Discussion) > > > See Stuart's comment on CDI-83. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 08:27:02 2017 From: issues at jboss.org (Matej Novotny (JIRA)) Date: Mon, 4 Sep 2017 08:27:02 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-194) Allow AnnotatedType for a given Bean to be obtained In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matej Novotny updated CDI-194: ------------------------------ Affects Version/s: 2.0 .Final > Allow AnnotatedType for a given Bean to be obtained > --------------------------------------------------- > > Key: CDI-194 > URL: https://issues.jboss.org/browse/CDI-194 > Project: CDI Specification Issues > Issue Type: Feature Request > Components: Portable Extensions > Affects Versions: 1.0, 2.0 .Final > Reporter: Jozef Hartinger > Fix For: 2.1 (Discussion) > > > See Stuart's comment on CDI-83. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Mon Sep 4 08:48:01 2017 From: issues at jboss.org (Martin Kouba (JIRA)) Date: Mon, 4 Sep 2017 08:48:01 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-715) Transitive stereotype declarations - clarify conflicting default scopes In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Kouba updated CDI-715: ----------------------------- Description: Stereotype declarations are transitive. However, the spec is not clear what happens if a stereotype declares a default scope and also a second stereotype which also declares a default scope. Only _"If a stereotype declares more than one scope, the container automatically detects the problem and treats it as a definition error."_ is defined. Weld currently does merge the stereotypes and throws {{DefinitionException}} if NOT all stereotypes specify the same scope _and_ the bean does NOT declare a scope (this makes sense imho). Note that this is not a problem for {{@Named}}, {{@Alternative}} and -interceptor bindings-. Any {{@Alternative}} makes a bean an alternative. Any {{@Named}} means the name is defaulted. -All bindings are added to the set-. UPDATE: Interceptor bindings are probably also affected. The interceptors spec defines _"An interceptor binding declared on a method or constructor replaces an interceptor binding of the same type declared at class level or inherited from a superclass."_ (3.3 Binding an Interceptor to a Component) which implies that multiple interceptor bindings of the same type are not supported. So the spec should probably cover cases where stereotypes declare the interceptor bindings of the same type. was: Stereotype declarations are transitive. However, the spec is not clear what happens if a stereotype declares a default scope and also a second stereotype which also declares a default scope. Only _"If a stereotype declares more than one scope, the container automatically detects the problem and treats it as a definition error."_ is defined. Weld currently does merge the stereotypes and throws {{DefinitionException}} if NOT all stereotypes specify the same scope _and_ the bean does NOT declare a scope (this makes sense imho). Note that this is not a problem for {{@Named}}, {{@Alternative}} and interceptor bindings. Any {{@Alternative}} makes a bean an alternative. Any {{@Named}} means the name is defaulted. All bindings are added to the set. > Transitive stereotype declarations - clarify conflicting default scopes > ----------------------------------------------------------------------- > > Key: CDI-715 > URL: https://issues.jboss.org/browse/CDI-715 > Project: CDI Specification Issues > Issue Type: Clarification > Reporter: Martin Kouba > Priority: Minor > > Stereotype declarations are transitive. However, the spec is not clear what happens if a stereotype declares a default scope and also a second stereotype which also declares a default scope. Only _"If a stereotype declares more than one scope, the container automatically detects the problem and treats it as a definition error."_ is defined. > > Weld currently does merge the stereotypes and throws {{DefinitionException}} if NOT all stereotypes specify the same scope _and_ the bean does NOT declare a scope (this makes sense imho). > Note that this is not a problem for {{@Named}}, {{@Alternative}} and -interceptor bindings-. > Any {{@Alternative}} makes a bean an alternative. Any {{@Named}} means the name is defaulted. -All bindings are added to the set-. > UPDATE: Interceptor bindings are probably also affected. The interceptors spec defines _"An interceptor binding declared on a method or constructor replaces an interceptor binding of the same type declared at class level or inherited from a superclass."_ (3.3 Binding an Interceptor to a Component) which implies that multiple interceptor bindings of the same type are not supported. So the spec should probably cover cases where stereotypes declare the interceptor bindings of the same type. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Wed Sep 6 04:04:02 2017 From: issues at jboss.org (Antoine Sabot-Durand (JIRA)) Date: Wed, 6 Sep 2017 04:04:02 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-716) Allow to recognize custom Bean at runtime In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459308#comment-13459308 ] Antoine Sabot-Durand commented on CDI-716: ------------------------------------------ Agree to go that way. IMO it would be better to add {{getKind()}} and know the exact bean kind (Managed, EJB, Producer, Custom, Built-in) > Allow to recognize custom Bean at runtime > ----------------------------------------- > > Key: CDI-716 > URL: https://issues.jboss.org/browse/CDI-716 > Project: CDI Specification Issues > Issue Type: Feature Request > Components: Beans > Affects Versions: 2.0 .Final > Reporter: Matej Novotny > > At the moment, they only way to tell custom bean (created via {{BeanConfigurator}} or class implementing {{javax.enterprise.inject.spi.Bean}}) from "standard" one is to have an extension and listen to {{ProcessSyntheticBean}}. This is good enough if it's sufficient to tell the difference at bootstrap time. > However, at runtime, there is no way to do this. > We could add a method to {{javax.enterprise.inject.spi.Bean}} which would allow to tell the difference. The name of the method could be {{isCustom()}} or {{getKind()}}. > Generally, there should be no need to differentiate between custom/standard beans, but when digging deeper, it doesn't hurt to know. Putting this into {{Bean}} interface keeps it deep enough while still giving the information. > One of the use cases for this would be CDI-194, which could be "nicely" implemented (avoiding {{null}} values), if there was a way to recognize custom bean. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Wed Sep 6 05:05:03 2017 From: issues at jboss.org (Antoine Sabot-Durand (JIRA)) Date: Wed, 6 Sep 2017 05:05:03 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-194) Allow AnnotatedType for a given Bean to be obtained In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459357#comment-13459357 ] Antoine Sabot-Durand commented on CDI-194: ------------------------------------------ Agree. Providing a way to access the actual class that defines a bean could solve some use cases in CDI-10 where people need to access annotation on the bean defining class > Allow AnnotatedType for a given Bean to be obtained > --------------------------------------------------- > > Key: CDI-194 > URL: https://issues.jboss.org/browse/CDI-194 > Project: CDI Specification Issues > Issue Type: Feature Request > Components: Portable Extensions > Affects Versions: 1.0, 2.0 .Final > Reporter: Jozef Hartinger > Fix For: 2.1 (Discussion) > > > See Stuart's comment on CDI-83. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From issues at jboss.org Wed Sep 6 05:15:02 2017 From: issues at jboss.org (Antoine Sabot-Durand (JIRA)) Date: Wed, 6 Sep 2017 05:15:02 -0400 (EDT) Subject: [cdi-dev] [JBoss JIRA] (CDI-10) Add ability to access a bean instance from a proxy In-Reply-To: References: Message-ID: [ https://issues.jboss.org/browse/CDI-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459376#comment-13459376 ] Antoine Sabot-Durand commented on CDI-10: ----------------------------------------- Some use cases here may be solved with CDI-194: giving access to the actual Bean class (or AnnotatedType) would give access annotations on classe, fields or methods. > Add ability to access a bean instance from a proxy > -------------------------------------------------- > > Key: CDI-10 > URL: https://issues.jboss.org/browse/CDI-10 > Project: CDI Specification Issues > Issue Type: Feature Request > Components: Beans > Affects Versions: 1.0 > Reporter: Stuart Douglas > Labels: F2F2016 > Fix For: 2.1 (Discussion) > > > There are occasions when it would be useful to access a bean instance directly from a proxy. This could be achieved by making all proxies assignable to an interface (say BeanProxy) that provides a getBeanInstance() method. > Client code that needs access to the actual instance can check if the object is assignable to the BeanProxy interface and then call getBeanInstance() to get the actual instance if required. > This is something that is probably more useful to extension writers than the end user, but there have already been a few requests on the weld forum about this so it is probably worth considering. -- This message was sent by Atlassian JIRA (v7.2.3#72005) From kalgon at hotmail.com Wed Sep 6 17:24:36 2017 From: kalgon at hotmail.com (Xavier Dury) Date: Wed, 6 Sep 2017 21:24:36 +0000 Subject: [cdi-dev] Attributes on scope annotations In-Reply-To: References: <774149744.4238668.1504255744039.JavaMail.zimbra@redhat.com> <348897407.4268818.1504266223255.JavaMail.zimbra@redhat.com> , Message-ID: forwarding your mail to the mailing list From: Todor Boev Sent: Monday, September 4, 2017 11:03 AM To: Xavier Dury Subject: Re: [cdi-dev] Attributes on scope annotations ? I did expect BeanManager.getScope() to return an annotation instance, when implementing my scope. Similarly to JSF my use case that the type of applications I need to support do not have such a specific execution flow as to allow me to define a singleton scope. Instead the users must be able to define the scope at a particular place in the execution flow. My workaround is to require that the users create a new scope annotation for each such scope and meta-annotate it with the data consumed by my extension. Then they can use their custom annotation for their custom scoped classes. This is however inconvenient for the most common case of a single custom-scoped class. Given however attributes on scopes are used in JSF should I open an issue for the CDI spec to support this use case? Regards On Sat, Sep 2, 2017 at 1:08 PM, Xavier Dury wrote: JSF [1] and Omnifaces [2] are doing it but it's against the spec. If this was allowed, I suppose BeanManager.getContext() [3] would have taken an annotation parameter instead of an annotation type. Xavier ---- [1] http://docs.oracle.com/javaee/7/api/javax/faces/flow/FlowScoped.html [2] http://omnifaces.org/docs/javadoc/2.6/org/omnifaces/cdi/ViewScoped.html [3] http://docs.oracle.com/javaee/7/api/javax/enterprise/inject/spi/BeanManager.html#getContext-java.lang.Class- From: cdi-dev-bounces at lists.jboss.org on behalf of Matej Novotny Sent: Friday, September 1, 2017 1:43 PM To: Todor Boev Cc: cdi-dev Subject: Re: [cdi-dev] Attributes on scope annotations ? Let's keep this conversation on CDI-dev list, please (adding back to CC). Hmm, I think it is not forbidden to add another plain java annotation. However, having it working as scope and cdi qualifier in the same time won't work. Matej ----- Original Message ----- > From: "Todor Boev" > To: "Matej Novotny" > Sent: Friday, September 1, 2017 12:33:54 PM > Subject: Re: [cdi-dev] Attributes on scope annotations > > Thank you for the timely replay, > > I need portable behavior, so the other option I am considering is to > meta-annotate the scope annotation with the additional information I need. > The issues are now: is this allowed, can in principle my custom > meta-annotation be a qualifier. Probably a plain annotation will be > sufficient, but I may need to have it do double-duty as a qualifier as well. > > Thanks in advance, > Todor > > On Fri, Sep 1, 2017 at 11:49 AM, Matej Novotny wrote: > > > Hello Todor, > > > > From CDI specification 2.0 section 2.4.2 Defining new scopes[1]: > > > > "A scope type must not have any attributes. If a scope type has attributes > > non-portable behavior results." > > > > Matej > > > > ____________________________________________________________ > > _______________- > > [1] http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html# JSR 365: Contexts and Dependency Injection for Java 2.0 docs.jboss.org Starting with version 2.0 CDI targets Java SE and Java EE platforms. CDI in Java SE and CDI in a Java EE container share the features defined in core CDI. > > defining_new_scope_type > > > > > > > > ----- Original Message ----- > > > From: "Todor Boev" > > > To: cdi-dev at lists.jboss.org > > > Sent: Friday, September 1, 2017 9:51:47 AM > > > Subject: [cdi-dev] Attributes on scope annotations > > > > > > Hello, > > > > > > Is it against the CDI 2.0 specification to have attributes on a scope > > > annotation? If not is this a corner case that may become forbidden or > > simply > > > not be taken into account in future versions of the specification? > > > > > > E.g. @ComponentScoped("my-component") > > > > > > With Weld 3.0.0 I was able to successfully use such annotations. > > > > > > Regards, > > > Todor > > > > > > > > > _______________________________________________ > > > 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 Apache License, Version 2.0 www.apache.org Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION. 1. Definitions. > > > 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 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. _______________________________________________ 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 rinsvind at gmail.com Thu Sep 7 11:07:35 2017 From: rinsvind at gmail.com (Todor Boev) Date: Thu, 7 Sep 2017 18:07:35 +0300 Subject: [cdi-dev] Correct way to programatically instantiate a Bean Message-ID: Hello, I need to create beans from a portable extension. It is not clear to me if every instance of a bean must have an associated instance of CreationalContext or rather one CreationalContext must be used for all instances: // Store a CreationalContext per bean instance BeanManager manager = ... Bean bean = ... Context ctx = manager.getContext(bean.getScope()); Map> dependents = ... public T createBean() { CreationalContext cctx = manager.createCreationalContext(bean); T instance = ctx.get(bean, cctx); dependents.put(instance, cctx); return instance; } public void destroyBean(T instance) { dependents.computeIfPresent(instance, (inst, cctx) -> { bean.destroy(inst, cctx); return null; }); } // CDI tracks dependents for me BeanManager manager = ... Bean bean = ... Context ctx = manager.getContext(bean.getScope()); CreationalContext cctx = manager.createCreationalContext(bean); public T createBean() { T instance = ctx.get(bean, cctx); return instance; } public void destroyBean(T instance) { bean.destroy(instance, cctx); } Best Regards, Todor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170907/8b4a71cb/attachment.html From manovotn at redhat.com Fri Sep 8 01:42:34 2017 From: manovotn at redhat.com (Matej Novotny) Date: Fri, 8 Sep 2017 01:42:34 -0400 (EDT) Subject: [cdi-dev] Correct way to programatically instantiate a Bean In-Reply-To: References: Message-ID: <967508246.9072908.1504849354775.JavaMail.zimbra@redhat.com> Hi Todor, if I am not mistaken, the CreationalContext is a way to bind dependent instances to bean (and so align their lifecycles). Which means I'd use new CreationalContext for each bean. Matej ----- Original Message ----- > From: "Todor Boev" > To: cdi-dev at lists.jboss.org > Sent: Thursday, September 7, 2017 5:07:35 PM > Subject: [cdi-dev] Correct way to programatically instantiate a Bean > > Hello, > > I need to create beans from a portable extension. > It is not clear to me if every instance of a bean must have an associated > instance of CreationalContext or rather one CreationalContext must be used > for all instances: > > // Store a CreationalContext per bean instance > BeanManager manager = ... > Bean bean = ... > Context ctx = manager.getContext(bean.getScope()); > > Map> dependents = ... > > public T createBean() { > CreationalContext cctx = manager.createCreationalContext(bean); > T instance = ctx.get(bean, cctx); > dependents.put(instance, cctx); > return instance; > } > > public void destroyBean(T instance) { > dependents.computeIfPresent(instance, (inst, cctx) -> { > bean.destroy(inst, cctx); > return null; > }); > } > > // CDI tracks dependents for me > BeanManager manager = ... > Bean bean = ... > Context ctx = manager.getContext(bean.getScope()); > CreationalContext cctx = manager.createCreationalContext(bean); > > public T createBean() { > T instance = ctx.get(bean, cctx); > return instance; > } > > public void destroyBean(T instance) { > bean.destroy(instance, cctx); > } > > Best Regards, > Todor > > _______________________________________________ > 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 rinsvind at gmail.com Fri Sep 8 04:20:51 2017 From: rinsvind at gmail.com (Todor Boev) Date: Fri, 8 Sep 2017 11:20:51 +0300 Subject: [cdi-dev] Fwd: Correct way to programatically instantiate a Bean In-Reply-To: References: <967508246.9072908.1504849354775.JavaMail.zimbra@redhat.com> Message-ID: Including CDI-DEV ---------- Forwarded message ---------- From: Todor Boev Date: Fri, Sep 8, 2017 at 11:03 AM Subject: Re: [cdi-dev] Correct way to programatically instantiate a Bean To: Matej Novotny Hi Matej, I am struggling to understand what do you mean by "bean". The Bean object that produces objects of type T, or each individual object of type T? If it is the T this should be the first of my code snippets: a new CreationalContext for every new T. If it is the Bean this should be the second of my code snippets: one CreationalContext all new T. Regards, Todor On Fri, Sep 8, 2017 at 8:42 AM, Matej Novotny wrote: > Hi Todor, > > if I am not mistaken, the CreationalContext is a way to bind > dependent instances to bean (and so align their lifecycles). > > Which means I'd use new CreationalContext for each bean. > > Matej > > ----- Original Message ----- > > From: "Todor Boev" > > To: cdi-dev at lists.jboss.org > > Sent: Thursday, September 7, 2017 5:07:35 PM > > Subject: [cdi-dev] Correct way to programatically instantiate a Bean > > > > Hello, > > > > I need to create beans from a portable extension. > > It is not clear to me if every instance of a bean must have an associated > > instance of CreationalContext or rather one CreationalContext must be > used > > for all instances: > > > > // Store a CreationalContext per bean instance > > BeanManager manager = ... > > Bean bean = ... > > Context ctx = manager.getContext(bean.getScope()); > > > > Map> dependents = ... > > > > public T createBean() { > > CreationalContext cctx = manager.createCreationalContext(bean); > > T instance = ctx.get(bean, cctx); > > dependents.put(instance, cctx); > > return instance; > > } > > > > public void destroyBean(T instance) { > > dependents.computeIfPresent(instance, (inst, cctx) -> { > > bean.destroy(inst, cctx); > > return null; > > }); > > } > > > > // CDI tracks dependents for me > > BeanManager manager = ... > > Bean bean = ... > > Context ctx = manager.getContext(bean.getScope()); > > CreationalContext cctx = manager.createCreationalContext(bean); > > > > public T createBean() { > > T instance = ctx.get(bean, cctx); > > return instance; > > } > > > > public void destroyBean(T instance) { > > bean.destroy(instance, cctx); > > } > > > > Best Regards, > > Todor > > > > _______________________________________________ > > 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/20170908/0027ecee/attachment.html From manovotn at redhat.com Fri Sep 8 04:35:37 2017 From: manovotn at redhat.com (Matej Novotny) Date: Fri, 8 Sep 2017 04:35:37 -0400 (EDT) Subject: [cdi-dev] Correct way to programatically instantiate a Bean In-Reply-To: References: <967508246.9072908.1504849354775.JavaMail.zimbra@redhat.com> Message-ID: <1916309824.9107856.1504859737959.JavaMail.zimbra@redhat.com> Hi, sorry for the ambiguity of the answer. I meant contexual instance - e.g. each individual object of type T (aka your first code snippet). BTW keep hitting "reply to all" so that we keep cdi-dev list in the loop :) Matej ----- Original Message ----- > From: "Todor Boev" > To: "Matej Novotny" > Sent: Friday, September 8, 2017 10:03:21 AM > Subject: Re: [cdi-dev] Correct way to programatically instantiate a Bean > > Hi Matej, > > I am struggling to understand what do you mean by "bean". > The Bean object that produces objects of type T, or each individual > object of type T? > > If it is the T this should be the first of my code snippets: a new > CreationalContext for every new T. > If it is the Bean this should be the second of my code snippets: one > CreationalContext all new T. > > Regards, > Todor > > On Fri, Sep 8, 2017 at 8:42 AM, Matej Novotny wrote: > > > Hi Todor, > > > > if I am not mistaken, the CreationalContext is a way to bind > > dependent instances to bean (and so align their lifecycles). > > > > Which means I'd use new CreationalContext for each bean. > > > > Matej > > > > ----- Original Message ----- > > > From: "Todor Boev" > > > To: cdi-dev at lists.jboss.org > > > Sent: Thursday, September 7, 2017 5:07:35 PM > > > Subject: [cdi-dev] Correct way to programatically instantiate a Bean > > > > > > Hello, > > > > > > I need to create beans from a portable extension. > > > It is not clear to me if every instance of a bean must have an associated > > > instance of CreationalContext or rather one CreationalContext must be > > used > > > for all instances: > > > > > > // Store a CreationalContext per bean instance > > > BeanManager manager = ... > > > Bean bean = ... > > > Context ctx = manager.getContext(bean.getScope()); > > > > > > Map> dependents = ... > > > > > > public T createBean() { > > > CreationalContext cctx = manager.createCreationalContext(bean); > > > T instance = ctx.get(bean, cctx); > > > dependents.put(instance, cctx); > > > return instance; > > > } > > > > > > public void destroyBean(T instance) { > > > dependents.computeIfPresent(instance, (inst, cctx) -> { > > > bean.destroy(inst, cctx); > > > return null; > > > }); > > > } > > > > > > // CDI tracks dependents for me > > > BeanManager manager = ... > > > Bean bean = ... > > > Context ctx = manager.getContext(bean.getScope()); > > > CreationalContext cctx = manager.createCreationalContext(bean); > > > > > > public T createBean() { > > > T instance = ctx.get(bean, cctx); > > > return instance; > > > } > > > > > > public void destroyBean(T instance) { > > > bean.destroy(instance, cctx); > > > } > > > > > > Best Regards, > > > Todor > > > > > > _______________________________________________ > > > 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 rinsvind at gmail.com Fri Sep 8 05:58:29 2017 From: rinsvind at gmail.com (Todor Boev) Date: Fri, 8 Sep 2017 12:58:29 +0300 Subject: [cdi-dev] Multiple CDI containers per ClassLoader Message-ID: Hi all, The javax.enterprise.inject.se.SeContainerInitializer seems to allow me to create and use simultaneously multiple CDI containers. Furthermore I don't seem to be required to setup each one with it's own ClassLoader. If I create multiple containers over the same ClassLoader, what would it mean to call javax.enterprise.inject.spi.CDI.current() in each one? Regards, Todor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170908/db4a1be7/attachment-0001.html From rinsvind at gmail.com Fri Sep 8 06:02:43 2017 From: rinsvind at gmail.com (Todor Boev) Date: Fri, 8 Sep 2017 13:02:43 +0300 Subject: [cdi-dev] Multiple CDI containers per ClassLoader In-Reply-To: References: Message-ID: To clarify: http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#provider_se Does not forbid such calls. On Fri, Sep 8, 2017 at 12:58 PM, Todor Boev wrote: > Hi all, > > The javax.enterprise.inject.se.SeContainerInitializer seems to allow me > to create and use simultaneously multiple CDI containers. > Furthermore I don't seem to be required to setup each one with it's own > ClassLoader. > If I create multiple containers over the same ClassLoader, what would it > mean to call javax.enterprise.inject.spi.CDI.current() in each one? > > Regards, > Todor > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170908/21b90e11/attachment.html From manovotn at redhat.com Fri Sep 8 06:36:28 2017 From: manovotn at redhat.com (Matej Novotny) Date: Fri, 8 Sep 2017 06:36:28 -0400 (EDT) Subject: [cdi-dev] Multiple CDI containers per ClassLoader In-Reply-To: References: Message-ID: <1528024660.9125535.1504866988538.JavaMail.zimbra@redhat.com> Hi > The javax.enterprise.inject.se .SeContainerInitializer seems to allow me to It's more like it does not forbid you from doing it. That means you can try, but it us undefined and up to implementation if they will anyhow handle/support that. > If I create multiple containers over the same ClassLoader, what would it mean > to call javax.enterprise.inject.spi.CDI.current() in each one? What happens when you actually do that is anyone's best guess. It's again impl specific matter. In Weld, if we detect more containers, I think we try to determine the caller and if that doesn't help, we give you back the first container reference. You can browse the code - https://github.com/weld/core/blob/master/environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldSEProvider.java#L59 Matej ----- Original Message ----- > From: "Todor Boev" > To: cdi-dev at lists.jboss.org > Sent: Friday, September 8, 2017 12:02:43 PM > Subject: Re: [cdi-dev] Multiple CDI containers per ClassLoader > > To clarify: > http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#provider_se > Does not forbid such calls. > > On Fri, Sep 8, 2017 at 12:58 PM, Todor Boev < rinsvind at gmail.com > wrote: > > > > Hi all, > > The javax.enterprise.inject.se .SeContainerInitializer seems to allow me to > create and use simultaneously multiple CDI containers. > Furthermore I don't seem to be required to setup each one with it's own > ClassLoader. > If I create multiple containers over the same ClassLoader, what would it mean > to call javax.enterprise.inject.spi.CDI.current() in each one? > > Regards, > Todor > > > _______________________________________________ > 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 mkouba at redhat.com Fri Sep 8 06:47:21 2017 From: mkouba at redhat.com (Martin Kouba) Date: Fri, 8 Sep 2017 12:47:21 +0200 Subject: [cdi-dev] Multiple CDI containers per ClassLoader In-Reply-To: <1528024660.9125535.1504866988538.JavaMail.zimbra@redhat.com> References: <1528024660.9125535.1504866988538.JavaMail.zimbra@redhat.com> Message-ID: Also Weld SE bootsrap API allows you to specify a "container id" which can be used to obtain the correct container instance. See also org.jboss.weld.environment.se.WeldContainer.instance(String). Martin Dne 8.9.2017 v 12:36 Matej Novotny napsal(a): > Hi > >> The javax.enterprise.inject.se .SeContainerInitializer seems to allow me to > > It's more like it does not forbid you from doing it. > That means you can try, but it us undefined and up to implementation if they will anyhow handle/support that. > >> If I create multiple containers over the same ClassLoader, what would it mean >> to call javax.enterprise.inject.spi.CDI.current() in each one? > > What happens when you actually do that is anyone's best guess. > It's again impl specific matter. > In Weld, if we detect more containers, I think we try to determine the caller and if that doesn't help, we give you back the first container reference. > You can browse the code - https://github.com/weld/core/blob/master/environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldSEProvider.java#L59 > > Matej > > ----- Original Message ----- >> From: "Todor Boev" >> To: cdi-dev at lists.jboss.org >> Sent: Friday, September 8, 2017 12:02:43 PM >> Subject: Re: [cdi-dev] Multiple CDI containers per ClassLoader >> >> To clarify: >> http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#provider_se >> Does not forbid such calls. >> >> On Fri, Sep 8, 2017 at 12:58 PM, Todor Boev < rinsvind at gmail.com > wrote: >> >> >> >> Hi all, >> >> The javax.enterprise.inject.se .SeContainerInitializer seems to allow me to >> create and use simultaneously multiple CDI containers. >> Furthermore I don't seem to be required to setup each one with it's own >> ClassLoader. >> If I create multiple containers over the same ClassLoader, what would it mean >> to call javax.enterprise.inject.spi.CDI.current() in each one? >> >> Regards, >> Todor >> >> >> _______________________________________________ >> 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 john.ament at spartasystems.com Mon Sep 11 06:40:48 2017 From: john.ament at spartasystems.com (John Ament) Date: Mon, 11 Sep 2017 10:40:48 +0000 Subject: [cdi-dev] Expected value of getType() for the injection point of an Instance object Message-ID: Hi, I found a small issue within OWB. The closest found TCK test (found by Romain) is https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L99 which tests the Instance type, but not the value of InjectionPoint.getType(). What should be the return value of getType() here? 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/20170911/05c42970/attachment.html From mkouba at redhat.com Mon Sep 11 07:00:35 2017 From: mkouba at redhat.com (Martin Kouba) Date: Mon, 11 Sep 2017 13:00:35 +0200 Subject: [cdi-dev] Expected value of getType() for the injection point of an Instance object In-Reply-To: References: Message-ID: <9af6f6e7-547b-e0cd-6911-605128d81e4b@redhat.com> Hi John, I believe it should be the required type of the injected Instance (which is the type parameter specified at the injection point - defined in "5.6.1. The Instance interface" and "5.5.7. Injection point metadata") unless you modify the type using Instance.select(). getType() is tested in: https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L74 and line 75 getQualifiers(): https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L86 and line 87 Martin Dne 11.9.2017 v 12:40 John Ament napsal(a): > Hi, > > > I found a small issue within OWB. The closest found TCK test (found by > Romain) is > https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L99 which > tests the Instance type, but not the value of InjectionPoint.getType(). > What should be the return value of getType() here? > > > 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 john.ament at spartasystems.com Mon Sep 11 07:25:27 2017 From: john.ament at spartasystems.com (John Ament) Date: Mon, 11 Sep 2017 11:25:27 +0000 Subject: [cdi-dev] Expected value of getType() for the injection point of an Instance object In-Reply-To: <9af6f6e7-547b-e0cd-6911-605128d81e4b@redhat.com> References: , <9af6f6e7-547b-e0cd-6911-605128d81e4b@redhat.com> Message-ID: Martin, Sorry, but I'm looking for a concrete answer. The tests you point to never test when the injection point is an Instance<> or Provider<>, e.g. the CDI built in beans. What I'm looking for would be something like "It should be a ParameterizedType impl that represents Instance" or "It should be the class Foo.class" or something else along those lines. Thanks, John ________________________________ From: Martin Kouba Sent: Monday, September 11, 2017 7:00 AM To: John Ament; cdi-dev Subject: Re: [cdi-dev] Expected value of getType() for the injection point of an Instance object Hi John, I believe it should be the required type of the injected Instance (which is the type parameter specified at the injection point - defined in "5.6.1. The Instance interface" and "5.5.7. Injection point metadata") unless you modify the type using Instance.select(). getType() is tested in: https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L74 and line 75 getQualifiers(): https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L86 and line 87 Martin Dne 11.9.2017 v 12:40 John Ament napsal(a): > Hi, > > > I found a small issue within OWB. The closest found TCK test (found by > Romain) is > https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L99 which > tests the Instance type, but not the value of InjectionPoint.getType(). > What should be the return value of getType() here? > > > 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 ________________________________ 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/20170911/167231cd/attachment-0001.html From manovotn at redhat.com Mon Sep 11 07:56:30 2017 From: manovotn at redhat.com (Matej Novotny) Date: Mon, 11 Sep 2017 07:56:30 -0400 (EDT) Subject: [cdi-dev] Expected value of getType() for the injection point of an Instance object In-Reply-To: References: <9af6f6e7-547b-e0cd-6911-605128d81e4b@redhat.com> Message-ID: <1936661439.9676361.1505130990926.JavaMail.zimbra@redhat.com> Hi John, not sure I grasp your question, but the test line Martin pointed you to: > assertEquals(bar.getFoo().getInjectionPoint().getType(), Foo.class); makes it IMO pretty clear. In case of @Inject Instance, the expected result in the test is `Foo.class`. You need to make use of the InjectionPoint in order to be able to retrieve this information. There is no way to directly call getType() on Instance - there is no such method. However, you can make use of the InjectionPoint; in this case the IP is Instance. Hope this is what you were after. Matej ----- Original Message ----- > From: "John Ament" > To: "cdi-dev" > Sent: Monday, September 11, 2017 1:25:27 PM > Subject: Re: [cdi-dev] Expected value of getType() for the injection point of an Instance object > > > > Martin, > > > > > Sorry, but I'm looking for a concrete answer. The tests you point to never > test when the injection point is an Instance<> or Provider<>, e.g. the CDI > built in beans. > > > > > What I'm looking for would be something like "It should be a > ParameterizedType impl that represents Instance" or "It should be the > class Foo.class" or something else along those lines. > > > > > Thanks, > > > > > John > > > > > > > From: Martin Kouba > Sent: Monday, September 11, 2017 7:00 AM > To: John Ament; cdi-dev > Subject: Re: [cdi-dev] Expected value of getType() for the injection point of > an Instance object > Hi John, > > I believe it should be the required type of the injected Instance (which > is the type parameter specified at the injection point - defined in > "5.6.1. The Instance interface" and "5.5.7. Injection point metadata") > unless you modify the type using Instance.select(). > > getType() is tested in: > https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L74 > > and line 75 > > getQualifiers(): > https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L86 > > and line 87 > > Martin > > Dne 11.9.2017 v 12:40 John Ament napsal(a): > > Hi, > > > > > > I found a small issue within OWB. The closest found TCK test (found by > > Romain) is > > https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L99 > > which > > > tests the Instance type, but not the value of InjectionPoint.getType(). > > What should be the return value of getType() here? > > > > > > 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 > > 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 mkouba at redhat.com Mon Sep 11 08:00:08 2017 From: mkouba at redhat.com (Martin Kouba) Date: Mon, 11 Sep 2017 14:00:08 +0200 Subject: [cdi-dev] Expected value of getType() for the injection point of an Instance object In-Reply-To: References: <9af6f6e7-547b-e0cd-6911-605128d81e4b@redhat.com> Message-ID: I'm sorry John but if you need concrete answer you should provide concrete instructions. In the TCK test there is @Dependent Foo which injects InjectionPoint and then the test does @Inject @Any Instance, obtains the Foo instance and inspects the InjectionPoint metadata. In fact, bar.getFoo() returns a child Instance with additional qualifier @Default. So it should Foo.class. Martin Dne 11.9.2017 v 13:25 John Ament napsal(a): > Martin, > > > Sorry, but I'm looking for a concrete answer. The tests you point to > never test when the injection point is an Instance<> or Provider<>, e.g. > the CDI built in beans. > > > What I'm looking for would be something like "It should be a > ParameterizedType impl that represents Instance" or "It should be > the class Foo.class" or something else along those lines. > > > Thanks, > > > John > > > > ------------------------------------------------------------------------ > *From:* Martin Kouba > *Sent:* Monday, September 11, 2017 7:00 AM > *To:* John Ament; cdi-dev > *Subject:* Re: [cdi-dev] Expected value of getType() for the injection > point of an Instance object > Hi John, > > I believe it should be the required type of the injected Instance (which > is the type parameter specified at the injection point - defined in > "5.6.1. The Instance interface" and "5.5.7. Injection point metadata") > unless you modify the type using Instance.select(). > > getType() is tested in: > https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L74 > > > and line 75 > > getQualifiers(): > https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L86 > > > and line 87 > > Martin > > Dne 11.9.2017 v 12:40 John Ament napsal(a): >> Hi, >> >> >> I found a small issue within OWB. The closest found TCK test (found by >> Romain) is >> https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/dynamic/DynamicInjectionPointTest.java#L99 > which > >> tests the Instance type, but not the value of InjectionPoint.getType(). >> What should be the return value of getType() here? >> >> >> 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 > ------------------------------------------------------------------------ > 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 arjan.tijms at gmail.com Sun Sep 17 13:59:46 2017 From: arjan.tijms at gmail.com (arjan tijms) Date: Sun, 17 Sep 2017 19:59:46 +0200 Subject: [cdi-dev] Moving build-in bean for Principal to Java EE Security? Message-ID: Hi, I wonder, wouldn't it be a good idea to let JSR 375 take ownership of the build-in bean in the Java EE part of CDI for Principal? The CDI spec proposed to the servlet spec to take ownership of the build-in beans for the Servlet owned artefacts (such as HttpServletRequest) before. Kind regards Arjan Tijms -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170917/b583eb56/attachment.html From rinsvind at gmail.com Mon Sep 18 04:18:59 2017 From: rinsvind at gmail.com (Todor Boev) Date: Mon, 18 Sep 2017 11:18:59 +0300 Subject: [cdi-dev] =?utf-8?b?0J7QttC10L3QuNGFINGB0LU=?= Message-ID: *______________________* *Todor Boev* OSGi Platform *Software AG* *From:* Yakub, Esin *Sent:* Monday, September 18, 2017 8:20 AM *To:* Z_Country_Bulgaria *Subject:* ?????? ?? ????????? ?? ? ??????? J ??? ? ?????????? ?????, ? ?? ??? ??? ?? . ??????? ???????! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170918/fb07f50e/attachment.html From arjan.tijms at gmail.com Tue Sep 19 07:37:43 2017 From: arjan.tijms at gmail.com (arjan tijms) Date: Tue, 19 Sep 2017 13:37:43 +0200 Subject: [cdi-dev] Interceptor bindings from interceptor when using 2.0 interception factory In-Reply-To: References: Message-ID: Hi, On Mon, Aug 28, 2017 at 9:41 AM, Martin Kouba wrote: > Set bindings = (Set) invocationContext.getContextDa >> ta().get("org.jboss.weld.interceptor.bindings"); >> > > In fact, a more safe way is to use the Weld API, cast the invocation > context to org.jboss.weld.interceptor.WeldInvocationContext and use the > appropriate methods. Looking in the code that seems to do the same thing, at least in Weld 3.0.1. Going via getContextData() is much easier though for code that has to support both Weld and OWB. > >> Yes. There is already a spec issue: https://issues.jboss.org/brows > e/CDI-468 but this would require a change in interceptors spec. I read the issue, thanks for the pointer. I do wonder if the entry in the context data isn't the easiest option regardless. That might only require an update in the CDI spec. Essentially, just standardise the key being used? Currently the interceptor factory is an absolutely fantastic feature, but its usefulness is greatly diminished by the fact that no interceptor at this moment can (reliably) retrieve the interceptor bindings for all CDI implementations. The spec even uses dynamically adding @Transactional as an example; *
 * @Produces
 * @RequestScoped
 * public MyClass produceMyClass(InterceptionFactory factory) {
 *     factory.configure().add(new AnnotationLiteral() {
 *     });
 *     return factory.createInterceptedInstance(new MyClass());
 * }


But all the current interceptor implementations backing @Transactional do
something like:

public Object proceed(InvocationContext ctx) throws Exception {
        Transactional transactionalAnnotation =
                ctx.getMethod().getAnnotation(Transactional.class);

So that clearly won't work.

The spec text for InterceptionFactory also doesn't mention this caveat at
all. So I wonder, what was the intended approach for   InterceptionFactory
and intercepter bindings with attributes?

Or was InterceptionFactory solely intended for intercepter bindings without
(non-binding) attributes?

Kind regards,
Arjan Tijms




>
>
>
>> Is there a standard way to get the bindings? Perhaps getting hold of the
>> Bean that represents the current Interceptor?
>>
>
> You can inject a bean with scope @Dependent, qualifier @Default and type
> Interceptor into any interceptor instance. However, this will not help for
> @Nonbinding value members of an interceptor binding.
>
>
>> Kind regards,
>> Arjan Tijms
>>
>>
>> _______________________________________________
>> 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/license
>> s/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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170919/bf71e020/attachment-0001.html 

From mkouba at redhat.com  Tue Sep 19 07:59:12 2017
From: mkouba at redhat.com (Martin Kouba)
Date: Tue, 19 Sep 2017 13:59:12 +0200
Subject: [cdi-dev] Interceptor bindings from interceptor when using 2.0
 interception factory
In-Reply-To: 
References: 
	
	
Message-ID: 

Dne 19.9.2017 v 13:37 arjan tijms napsal(a):
> Hi,
> 
> On Mon, Aug 28, 2017 at 9:41 AM, Martin Kouba  > wrote:
> 
>         Set bindings = (Set)
>         invocationContext.getContextData().get("org.jboss.weld.interceptor.bindings");
> 
> 
>     In fact, a more safe way is to use the Weld API, cast the invocation
>     context to org.jboss.weld.interceptor.WeldInvocationContext and use
>     the appropriate methods.
> 
> 
> Looking in the code that seems to do the same thing, at least in Weld 3.0.1.

No really. Weld stores the bindings also in context data but the API is 
using a direct reference to a stored set.

> 
> Going via getContextData() is much easier though for code that has to 
> support both Weld and OWB.

Yep, standardizing the key is the only viable solution without 
interceptors spec change. However, it's not typesafe, easy-to-use, etc.

> 
> 
> 
>     Yes. There is already a spec issue:
>     https://issues.jboss.org/browse/CDI-468
>      but this would require a
>     change in interceptors spec.
> 
> 
> I read the issue, thanks for the pointer. I do wonder if the entry in 
> the context data isn't the easiest option regardless. That might only 
> require an update in the CDI spec. Essentially, just standardise the key 
> being used?
> 
> Currently the interceptor factory is an absolutely fantastic feature, 
> but its usefulness is greatly diminished by the fact that no interceptor 
> at this moment can (reliably) retrieve the interceptor bindings for all 
> CDI implementations.
> 
> The spec even uses dynamically adding @Transactional as an example;
> 
>   * 
>   * @Produces
>   * @RequestScoped
>   * public MyClass produceMyClass(InterceptionFactory factory) {
>   *     factory.configure().add(new AnnotationLiteral() {
>   *     });
>   *     return factory.createInterceptedInstance(new MyClass());
>   * }
> 
> 
> But all the current interceptor implementations backing @Transactional 
> do something like:
> 
> public Object proceed(InvocationContext ctx) throws Exception {
>          Transactional transactionalAnnotation =
>                  ctx.getMethod().getAnnotation(Transactional.class);

And this is obviously wrong. Recently, we've reviewed a Narayana PR 
which is about to fix this problem:
https://github.com/jbosstm/narayana/pull/1211

I personally think that JTA TCK is missing some essential tests here.

> 
> So that clearly won't work.
> 
> The spec text for InterceptionFactory also doesn't mention this caveat 
> at all. So I wonder, what was the intended approach for   
> InterceptionFactory and intercepter bindings with attributes?
> 
> Or was InterceptionFactory solely intended for intercepter bindings 
> without (non-binding) attributes?

I don't think this is an InterceptionFactory-specific problem. It's a 
general issue. It should work the same if you use an extension to add an 
interceptor binding.

> 
> Kind regards,
> Arjan Tijms
> 
> 
> 
> 
> 
>         Is there a standard way to get the bindings? Perhaps getting
>         hold of the Bean that represents the current Interceptor?
> 
> 
>     You can inject a bean with scope @Dependent, qualifier @Default and
>     type Interceptor into any interceptor instance. However, this will
>     not help for @Nonbinding value members of an interceptor binding.
> 
> 
>         Kind regards,
>         Arjan Tijms
> 
> 
>         _______________________________________________
>         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
> 
> 

-- 
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic

From arjan.tijms at gmail.com  Tue Sep 19 09:22:26 2017
From: arjan.tijms at gmail.com (arjan tijms)
Date: Tue, 19 Sep 2017 15:22:26 +0200
Subject: [cdi-dev] Interceptor bindings from interceptor when using 2.0
 interception factory
In-Reply-To: 
References: 
	
	
	
Message-ID: 

Hi,

On Tue, Sep 19, 2017 at 1:59 PM, Martin Kouba  wrote:

>
>>
> No really. Weld stores the bindings also in context data but the API is
> using a direct reference to a stored set.


Ah, ok, thx



> Going via getContextData() is much easier though for code that has to
>> support both Weld and OWB.
>>
>
> Yep, standardizing the key is the only viable solution without
> interceptors spec change. However, it's not typesafe, easy-to-use, etc.


I hear you. The question is when the earliest opportunity will be to update
the interceptor spec then. With the whole Java EE transfer I guess this
will have to wait at least until that transfer is complete. Hopefully in
the new process we can have something like a hierarchical responsibility
for specs, such that if e.g. Interceptors and AtInject is not explicitly
open, but CDI is, that the CDI EG can take responsibility for it and make
changes there.

For now though, if OWB could also store the bindings under some key,
interceptors that are intended to be portable can practically check both
keys then. Not ideal, but may be a good intermediate solution.



> And this is obviously wrong. Recently, we've reviewed a Narayana PR which
> is about to fix this problem:
> https://github.com/jbosstm/narayana/pull/1211
>
> I personally think that JTA TCK is missing some essential tests here.


Agreed, and the Java EE Security TCK misses those same tests as well, as it
also ships with interceptors.


I don't think this is an InterceptionFactory-specific problem. It's a
> general issue. It should work the same if you use an extension to add an
> interceptor binding.
>


You're right, the InterceptionFactory just brought it to the surface again
for people testing CDI 2.0 features.

Handling stereotypes as per the issue can be a problem as well. I wonder,
wouldn't it be convenient if CDI offers a utility method to look for an
annotation where it would automatically recurses into stereotypes?

I created something like for OmniFaces a while ago:

https://github.com/omnifaces/omnifaces/blob/develop/src/main/java/org/omnifaces/util/BeansLocal.java#L221

Kind regards,
Arjan Tijms



>
>
>> Kind regards,
>> Arjan Tijms
>>
>>
>>
>>
>>
>>         Is there a standard way to get the bindings? Perhaps getting
>>         hold of the Bean that represents the current Interceptor?
>>
>>
>>     You can inject a bean with scope @Dependent, qualifier @Default and
>>     type Interceptor into any interceptor instance. However, this will
>>     not help for @Nonbinding value members of an interceptor binding.
>>
>>
>>         Kind regards,
>>         Arjan Tijms
>>
>>
>>         _______________________________________________
>>         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
>>
>>
>>
> --
> Martin Kouba
> Senior Software Engineer
> Red Hat, Czech Republic
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170919/4735003b/attachment.html 

From issues at jboss.org  Tue Sep 19 09:26:00 2017
From: issues at jboss.org (arjan tijms (JIRA))
Date: Tue, 19 Sep 2017 09:26:00 -0400 (EDT)
Subject: [cdi-dev] [JBoss JIRA] (CDI-610) Add API to obtain current
 injection point from Bean#create
In-Reply-To: 
References: 
	
Message-ID: 


    [ https://issues.jboss.org/browse/CDI-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465682#comment-13465682 ] 

arjan tijms commented on CDI-610:
---------------------------------

Just wondering, any updates for this? Would this be in scope for CDI 2.1 perhaps?

> Add API to obtain current injection point from Bean#create
> ----------------------------------------------------------
>
>                 Key: CDI-610
>                 URL: https://issues.jboss.org/browse/CDI-610
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>            Reporter: arjan tijms
>
> There's currently not a clear way on how to obtain the *current* injection point (if any) from {{Bean#create}}.
> A previously somewhat accepted way (though not specified) was:
> {code}
>   Bean bean = beanManager.resolve(beanManager.getBeans(InjectionPoint.class));
>   InjectionPoint injectionPoint = (InjectionPoint) beanManager.getReference(bean, InjectionPoint.class, creationalContext);
> {code}
> This however broke in some version of Weld.
> Since getting the injection point is an often used feature in producers, I'd like to propose to introduce an easy API for this, so {{Bean}} implementations can use this just as easily. E.g. something like: {{BeanManager#getCurrentInjectionPoint()}}.
> Also see: http://cdi-development-mailing-list.1064426.n5.nabble.com/Getting-injection-point-from-Bean-create-td5710505i20.html



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

From issues at jboss.org  Tue Sep 19 11:09:00 2017
From: issues at jboss.org (Martin Kouba (JIRA))
Date: Tue, 19 Sep 2017 11:09:00 -0400 (EDT)
Subject: [cdi-dev] [JBoss JIRA] (CDI-610) Add API to obtain current
 injection point from Bean#create
In-Reply-To: 
References: 
	
Message-ID: 


    [ https://issues.jboss.org/browse/CDI-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465789#comment-13465789 ] 

Martin Kouba commented on CDI-610:
----------------------------------

Maybe we don't need to extend the API but instead clarify that for a {{@Dependent}} bean it should be possible to obtain {{InjectionPoint}} from within {{Contextual.create()}} (e.g. using {{BeanManager.createInstance().select(InjectionPoint.class).get()}}) and during invocation of a callback specified by {{BeanConfigurator.produceWith()}} (https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/injectionPoint/beanConfigurator/BeanConfiguratorExtension.java#L40).

Note that {{CreationalContext}} is currently bound to a bean instance, not an injection point, e.g. an instance might be reused when resolving all injection points of a bean instance. (of course this is just an impl detail)

> Add API to obtain current injection point from Bean#create
> ----------------------------------------------------------
>
>                 Key: CDI-610
>                 URL: https://issues.jboss.org/browse/CDI-610
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>            Reporter: arjan tijms
>
> There's currently not a clear way on how to obtain the *current* injection point (if any) from {{Bean#create}}.
> A previously somewhat accepted way (though not specified) was:
> {code}
>   Bean bean = beanManager.resolve(beanManager.getBeans(InjectionPoint.class));
>   InjectionPoint injectionPoint = (InjectionPoint) beanManager.getReference(bean, InjectionPoint.class, creationalContext);
> {code}
> This however broke in some version of Weld.
> Since getting the injection point is an often used feature in producers, I'd like to propose to introduce an easy API for this, so {{Bean}} implementations can use this just as easily. E.g. something like: {{BeanManager#getCurrentInjectionPoint()}}.
> Also see: http://cdi-development-mailing-list.1064426.n5.nabble.com/Getting-injection-point-from-Bean-create-td5710505i20.html



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

From issues at jboss.org  Wed Sep 20 02:59:00 2017
From: issues at jboss.org (Martin Kouba (JIRA))
Date: Wed, 20 Sep 2017 02:59:00 -0400 (EDT)
Subject: [cdi-dev] [JBoss JIRA] (CDI-610) Add API to obtain current
 injection point from Bean#create
In-Reply-To: 
References: 
	
Message-ID: 


    [ https://issues.jboss.org/browse/CDI-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465789#comment-13465789 ] 

Martin Kouba edited comment on CDI-610 at 9/20/17 2:58 AM:
-----------------------------------------------------------

Maybe we don't need to extend the API but instead clarify that for a {{@Dependent}} bean it should be possible to obtain {{InjectionPoint}} from within {{Contextual.create()}} (e.g. using [BeanManager.createInstance().select(InjectionPoint.class).get()|https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/injectionPoint/custom/JuicyBarBean.java#L41]) and during invocation of a callback specified by {{BeanConfigurator.produceWith()}} (e.g. https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/injectionPoint/beanConfigurator/BeanConfiguratorExtension.java#L40).

Note that {{CreationalContext}} is currently bound to a bean instance, not an injection point, e.g. an instance might be reused when resolving all injection points of a bean instance. (of course this is just an impl detail)


was (Author: mkouba):
Maybe we don't need to extend the API but instead clarify that for a {{@Dependent}} bean it should be possible to obtain {{InjectionPoint}} from within {{Contextual.create()}} (e.g. using {{BeanManager.createInstance().select(InjectionPoint.class).get()}}) and during invocation of a callback specified by {{BeanConfigurator.produceWith()}} (https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/injectionPoint/beanConfigurator/BeanConfiguratorExtension.java#L40).

Note that {{CreationalContext}} is currently bound to a bean instance, not an injection point, e.g. an instance might be reused when resolving all injection points of a bean instance. (of course this is just an impl detail)

> Add API to obtain current injection point from Bean#create
> ----------------------------------------------------------
>
>                 Key: CDI-610
>                 URL: https://issues.jboss.org/browse/CDI-610
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>            Reporter: arjan tijms
>
> There's currently not a clear way on how to obtain the *current* injection point (if any) from {{Bean#create}}.
> A previously somewhat accepted way (though not specified) was:
> {code}
>   Bean bean = beanManager.resolve(beanManager.getBeans(InjectionPoint.class));
>   InjectionPoint injectionPoint = (InjectionPoint) beanManager.getReference(bean, InjectionPoint.class, creationalContext);
> {code}
> This however broke in some version of Weld.
> Since getting the injection point is an often used feature in producers, I'd like to propose to introduce an easy API for this, so {{Bean}} implementations can use this just as easily. E.g. something like: {{BeanManager#getCurrentInjectionPoint()}}.
> Also see: http://cdi-development-mailing-list.1064426.n5.nabble.com/Getting-injection-point-from-Bean-create-td5710505i20.html



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

From rinsvind at gmail.com  Thu Sep 21 06:22:48 2017
From: rinsvind at gmail.com (Todor Boev)
Date: Thu, 21 Sep 2017 13:22:48 +0300
Subject: [cdi-dev] =?utf-8?b?0J7QttC10L3QuNGFINGB0LU=?=
In-Reply-To: 
References: 
Message-ID: 

I am extremely sorry this was accidentally posted to cdi-dev.

2017-09-18 11:18 GMT+03:00 Todor Boev :

>
>
>
>
> *______________________*
>
> *Todor Boev*
>
> OSGi Platform
>
> *Software AG*
>
>
>
> *From:* Yakub, Esin
> *Sent:* Monday, September 18, 2017 8:20 AM
> *To:* Z_Country_Bulgaria
> *Subject:* ?????? ??
>
>
>
> ????????? ?? ? ??????? J
>
>
>
> ???
> 
> ? ?????????? ?????, ? ?? ??? ??? ??
> 
> .
>
>
>
> ??????? ???????!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170921/58a019e9/attachment.html 

From issues at jboss.org  Mon Sep 25 04:39:01 2017
From: issues at jboss.org (Martin Kouba (JIRA))
Date: Mon, 25 Sep 2017 04:39:01 -0400 (EDT)
Subject: [cdi-dev] [JBoss JIRA] (CDI-455) Allow building of TypeLiteral's
 with dynamic types
In-Reply-To: 
References: 
	
Message-ID: 


     [ https://issues.jboss.org/browse/CDI-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Kouba updated CDI-455:
-----------------------------
    Fix Version/s: 2.1 (Discussion)


> Allow building of TypeLiteral's with dynamic types
> --------------------------------------------------
>
>                 Key: CDI-455
>                 URL: https://issues.jboss.org/browse/CDI-455
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>            Reporter: Lucas Ventura Carro
>             Fix For: 2.1 (Discussion)
>
>
> It could be useful the building of {{TypeLiteral}}'s, but using dynamic types. This way, the types can be indicated at runtime and not in compile. This functionality is "doable" as it is done at [Guice|https://github.com/google/guice], a similar injection framework, and as [this post shows|http://luisfsgoncalves.wordpress.com/2010/09/08/generic-bindings-with-guice/].



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

From issues at jboss.org  Mon Sep 25 04:39:01 2017
From: issues at jboss.org (Martin Kouba (JIRA))
Date: Mon, 25 Sep 2017 04:39:01 -0400 (EDT)
Subject: [cdi-dev] [JBoss JIRA] (CDI-455) Allow building of TypeLiteral's
 with dynamic types
In-Reply-To: 
References: 
	
Message-ID: 


    [ https://issues.jboss.org/browse/CDI-455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13467709#comment-13467709 ] 

Martin Kouba commented on CDI-455:
----------------------------------

I think we should add {{Event.select()}} and {{Instance.select()}} variants which also accept {{java.lang.reflect.Type}}. The argument should be checked at runtime and {{IllegalArgumentException}} should be thrown if the type is not a subtype of the event/required type.

Also the trick with {{ChocolateEater}} described above would only work for simple parameterized types and not for more complex use cases.

> Allow building of TypeLiteral's with dynamic types
> --------------------------------------------------
>
>                 Key: CDI-455
>                 URL: https://issues.jboss.org/browse/CDI-455
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>            Reporter: Lucas Ventura Carro
>             Fix For: 2.1 (Discussion)
>
>
> It could be useful the building of {{TypeLiteral}}'s, but using dynamic types. This way, the types can be indicated at runtime and not in compile. This functionality is "doable" as it is done at [Guice|https://github.com/google/guice], a similar injection framework, and as [this post shows|http://luisfsgoncalves.wordpress.com/2010/09/08/generic-bindings-with-guice/].



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

From issues at jboss.org  Tue Sep 26 10:39:00 2017
From: issues at jboss.org (Matej Novotny (JIRA))
Date: Tue, 26 Sep 2017 10:39:00 -0400 (EDT)
Subject: [cdi-dev] [JBoss JIRA] (CDI-717) Element mistakenly removed from
 beans_2_0.xsd
In-Reply-To: 
References: 
	
Message-ID: 

Matej Novotny created CDI-717:
---------------------------------

             Summary: Element mistakenly removed from beans_2_0.xsd
                 Key: CDI-717
                 URL: https://issues.jboss.org/browse/CDI-717
             Project: CDI Specification Issues
          Issue Type: Bug
    Affects Versions: 2.0 .Final
            Reporter: Matej Novotny


While creating and editing {{beans_2_0.xsd}} there was one line removed as part of [this PR|https://github.com/cdi-spec/cdi/pull/348]. This line is present in {{beans_1_1.xsd}} -> [see the code|https://github.com/cdi-spec/cdi/blob/master/api/src/main/resources/beans_1_1.xsd#L83].

To sum up the meaning of this line, it allows presence of any other non-defined element from _other namespace (than target namespace)_ and further on enforces validation of such element against corresponding XSD.

As a consequence of this change, following {{beans.xml}} is valid with CDI 1.2 ({{beans_1_1.xsd}}) but no longer against CDI 2.0 ({{beans_2_0.xsd}}):
{code}


    
        
    

{code}




--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

From issues at jboss.org  Wed Sep 27 05:40:00 2017
From: issues at jboss.org (Martin Kouba (JIRA))
Date: Wed, 27 Sep 2017 05:40:00 -0400 (EDT)
Subject: [cdi-dev] [JBoss JIRA] (CDI-718) Bean creation and dependency
 injection should not be performed before AfterDeploymentValidation
In-Reply-To: 
References: 
	
Message-ID: 

Martin Kouba created CDI-718:
--------------------------------

             Summary: Bean creation and dependency injection should not be performed before AfterDeploymentValidation
                 Key: CDI-718
                 URL: https://issues.jboss.org/browse/CDI-718
             Project: CDI Specification Issues
          Issue Type: Clarification
            Reporter: Martin Kouba
             Fix For: 2.1 (Discussion)


The spec is clear that it is not allowed to invoke {{BeanManager.getReference()}},  {{BeanManager.getInjectableReference()}} and {{BeanManager.createInstance()}} before {{AfterDeploymentValidation}}. I.e. it could be safely used during {{AfterDeploymentValidation}} and after the application initialization finished. The reason is that  before ADV the set of beans/interceptors/decorators may not be complete and extensions can still affect the resolution.

However, using {{InjectionTarget}}, {{UnmanagedInstance}} and {{Contextual.create()}} has the same risks. I think we should clarify the usage so that the spec is consistent.

WRT backward compatibility - note that the container is permitted to define a non-portable mode to overcome problems with legacy applications not using CDI SPI properly.




--
This message was sent by Atlassian JIRA
(v7.2.3#72005)

From arjan.tijms at gmail.com  Wed Sep 27 14:36:28 2017
From: arjan.tijms at gmail.com (arjan tijms)
Date: Wed, 27 Sep 2017 20:36:28 +0200
Subject: [cdi-dev] Moving build-in bean for Principal to Java EE
	Security?
In-Reply-To: 
References: 
Message-ID: 

Hi,

Just a small ping ;)

Kind regards,
Arjan Tijms

On Sun, Sep 17, 2017 at 7:59 PM, arjan tijms  wrote:

> Hi,
>
> I wonder, wouldn't it be a good idea to let JSR 375 take ownership of the build-in
> bean in the Java EE part of CDI for Principal?
>
> The CDI spec proposed to the servlet spec to take ownership of the build-
> in beans for the Servlet owned artefacts (such as
> HttpServletRequest) before.
>
> Kind regards
> Arjan Tijms
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20170927/ff1e5383/attachment.html 

From mkouba at redhat.com  Fri Sep 29 02:43:04 2017
From: mkouba at redhat.com (Martin Kouba)
Date: Fri, 29 Sep 2017 08:43:04 +0200
Subject: [cdi-dev] Moving build-in bean for Principal to Java EE
	Security?
In-Reply-To: 
References: 
	
Message-ID: <0de6a01e-096c-3442-2c7b-261aeedbf93b@redhat.com>

+1

Is there a spec issue?

Martin

Dne 27.9.2017 v 20:36 arjan tijms napsal(a):
> Hi,
> 
> Just a small ping ;)
> 
> Kind regards,
> Arjan Tijms
> 
> On Sun, Sep 17, 2017 at 7:59 PM, arjan tijms  > wrote:
> 
>     Hi,
> 
>     I wonder, wouldn't it be a good idea to let JSR 375 take ownership
>     of the build-in bean in the Java EE part of CDI for Principal?
> 
>     The CDI?spec proposed to the servlet spec to take ownership of the
>     build-inbeans?for the Servlet owned artefacts (such as
>     HttpServletRequest)?before.
> 
>     Kind regards
>     Arjan Tijms
> 
> 
> 
> 
> _______________________________________________
> 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