Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax the scope requirement for public fields #698

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/src/main/asciidoc/core/implementation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ A _managed bean_ is a bean that is implemented by a Java class.
This class is called the _bean class_ of the managed bean.
The basic lifecycle and semantics of managed beans are defined by the Managed Beans specification.


If a managed bean has a non-static public field, it must have scope `@Dependent`. If a managed bean with a non-static public field declares any scope other than `@Dependent`, the container automatically detects the problem and treats it as a definition error.
If a managed bean has a non-static public field, its scope must be a <<normal_scope,pseudo-scope>> (for example, `@Dependent` or `@Singleton`).
If a managed bean with a non-static public field declares a normal scope, the container automatically detects the problem and treats it as a definition error.

If the managed bean class is a generic type, it must have scope `@Dependent`. If a managed bean with a parameterized bean class declares any scope other than `@Dependent`, the container automatically detects the problem and treats it as a definition error.

Expand Down