[JBoss JIRA] (CDI-677) Specify the default scope for beans created from BeanConfigurator
by John Ament (JIRA)
[ https://issues.jboss.org/browse/CDI-677?page=com.atlassian.jira.plugin.sy... ]
John Ament updated CDI-677:
---------------------------
Summary: Specify the default scope for beans created from BeanConfigurator (was: Specify the default scope for BeanConfigurator)
> Specify the default scope for beans created from BeanConfigurator
> -----------------------------------------------------------------
>
> Key: CDI-677
> URL: https://issues.jboss.org/browse/CDI-677
> Project: CDI Specification Issues
> Issue Type: Clarification
> Reporter: Martin Kouba
> Fix For: 2.0 .Final
>
>
> Right now, this is undefined. However, it might me useful to specify that the scope is defaulted if not set by {{BeanConfigurator.scope(Class<? extends Annotation>)}}. The default scope could be either {{@Dependent}} or determined by the rules from "2.4.4. Default scope" (i.e. including default scopes from stereotypes).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (CDI-677) Specify the default scope for BeanConfigurator
by Martin Kouba (JIRA)
Martin Kouba created CDI-677:
--------------------------------
Summary: Specify the default scope for BeanConfigurator
Key: CDI-677
URL: https://issues.jboss.org/browse/CDI-677
Project: CDI Specification Issues
Issue Type: Clarification
Reporter: Martin Kouba
Fix For: 2.0 .Final
Right now, this is undefined. However, it might me useful to specify that the scope is defaulted if not set by {{BeanConfigurator.scope(Class<? extends Annotation>)}}. The default scope could be either {{@Dependent}} or determined by the rules from "2.4.4. Default scope" (i.e. including default scopes from stereotypes).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
Clarification of Any qualifier
by John Ament
Hi,
So an issue came up with OWB and programmatic look up.
In OWB, when you use CDI.current() the instance you get back includes an any qualifier. I do a programmatic look up of a custom bean that is registered with just a single qualifier - @Database. OWB looks up an instance that has qualifiers Any and Database, but cannot find any because my bean doesn't declare it.
My interpretation of http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#builtin_qualifiers is that the container (OWB) should be adding @Any to my custom bean even if I don't specify it. Is that the proper interpretation? Or am I required to add @Any to my bean?
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.
8 years