[cdi-dev] [JBoss JIRA] (CDI-348) Clarify which beans "have" bean defining annotations

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Fri Mar 29 08:56:42 EDT 2013


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

Jozef Hartinger reopened CDI-348:
---------------------------------



{quote}Any scope type is a bean defining annotation, and any bean which has a scope type declared on the bean class is said to have a bean defining annotation.{quote}

This is quite weirdly specified. Assume the following class:

{noformat}
@ApplicationScoped
public class FooProducer {

    @Produces
    public Integer produceInteger() {
        return 0;
    }
}
{noformat}

{quote}bean which has a scope type declared on the bean class is said to have a bean defining annotation{quote}

FooProducer is the bean class of the producer method. However, we cannot say that the producer method *has* a scope type declared on the bean class. It's more of an observation that the bean class of the producer method declares a bean defining annotation.


                
> Clarify which beans "have" bean defining annotations
> ----------------------------------------------------
>
>                 Key: CDI-348
>                 URL: https://issues.jboss.org/browse/CDI-348
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Beans
>    Affects Versions: 1.1.PFD
>            Reporter: Jozef Hartinger
>            Assignee: Pete Muir
>            Priority: Blocker
>             Fix For: 1.1.FD
>
>
> {quote}Any bean which has scope type is said to have a bean defining annotation.{quote}
> The spec makes this vague statement and provides two examples which only cover the two simplest cases. What remains unclear is:
> - if a bean class inherits a scope annotation definition from a superclass, should it be discovered in an implicit bean archive?
> - if a bean inherits a scope from a stereotype, should it be discovered in an implicit bean archive?
> - if a producer method / field has a scope annotation but the declaring bean is not a bean with bean defining annotation, whould the producer be discovered?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list