[JBoss JIRA] (CDI-715) Transitive stereotype declarations - clarify conflicting scopes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JBoss JIRA] (CDI-715) Transitive stereotype declarations - clarify conflicting scopes

JIRA issues@jboss.org
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)
_______________________________________________
cdi-dev mailing list
[hidden email]
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.