December 2017
Intermediate to advanced
372 pages
8h 46m
English
Managed beans always have a scope. A managed bean scope defines the lifespan of the application. The managed bean scope is defined by a class level annotation. The following table lists all valid managed bean scopes:
|
Named bean scope annotation |
Description |
|
@ApplicationScoped |
The same instance of application scoped named beans is available to all of our application's clients. If one client modifies the value of an application scoped managed bean, the change is reflected across clients. |
|
@SessionScoped |
An instance of each session scoped named bean is assigned to each of our application's clients. A session-scoped named bean can be used to hold client-specific data across requests. |
|
@RequestScoped |
Request ... |