Skip to content

Commit

Permalink
CDI-377 automatic JSR-330 annotation processing problematic
Browse files Browse the repository at this point in the history
Modification of bean definition annotation to exclude JSR-330 scopes types
adding Stereotypes, Decorators and Interceptors
  • Loading branch information
antoinesd committed Mar 10, 2014
1 parent 0e29d1d commit 03450e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions spec/src/main/doc/definition.asciidoc
Expand Up @@ -500,9 +500,17 @@ If a bean explicitly declares a scope, any default scopes declared by stereotype

=== Bean defining annotations

A bean class may have a _bean defining annotation_, allowing it to be placed anywhere in an application, as defined in <<bean_archive>>.
A bean class may have a _bean defining annotation_, allowing it to be placed anywhere in an application, as defined in <<bean_archive>>. A bean class with a _bean defining annotation_ is said to be an _implicit bean_.

Any scope type is a bean defining annotation. If a scope type is declared on a bean class, then the bean class is said to have a bean defining annotation. For example, this dependent scoped bean has a bean defining annotation:
The set of bean defining annotations contains :

* `@ApplicationScoped`, `@SessionScoped`, `@ConversationScoped` and `@RequestScoped` annotations,
* all others normal scope types,
* `@Interceptor` and `@Decorator` annotations,
* all stereotypes annotations (i.e. annotations annotated with `@Stereotype`),
* and the `@Dependent` scope annotation.

If one of these annotations is declared on a bean class, then the bean class is said to have a bean defining annotation. For example, this dependent scoped bean has a bean defining annotation:

[source,java]
----
Expand All @@ -525,6 +533,8 @@ public class CoffeeShop
}
----

Note that to ensure compatibility with other JSR-330 implementations, all pseudo-scopes annotations except `@Dependent` *are not* bean defining annotations. However a stereotype annotation including a pseudo-scope annotation *is* a bean defining annotation.

[[names]]

=== Bean names
Expand Down
2 changes: 1 addition & 1 deletion spec/src/main/doc/packagingdeployment.asciidoc
Expand Up @@ -34,7 +34,7 @@ An _explicit bean archive_ is an archive which contains a +beans.xml+ file:
* with no version number, or,
* that is an empty file.

An _implicit bean archive_ is any other archive which contains one or more bean classes with a bean defining annotation, or one or more session beans.
An _implicit bean archive_ is any other archive which contains one or more bean classes with a bean defining annotation as defined in <<bean_defining_annotations>>, or one or more session beans.

When determining which archives are bean archives, the container must consider:

Expand Down

0 comments on commit 03450e0

Please sign in to comment.