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)