- Mastering JavaServer Faces 2.2
- Anghel Leonard
- 93字
- 2021-12-08 12:41:32
Managed bean instantiation
By default, a managed bean is instantiated at first reference to it (a request, for example)—this is known as lazy instantiation. You can alter the default behavior by adding the eager
attribute and set its value to true
. This will instantiate the managed bean when the application starts, before any request is made. But, it is important to know that this works only for application scoped beans and the eager instantiated bean is placed in the application scope, as shown in the following lines of code:
@ManagedBean(eager=true) @ApplicationScoped
推薦閱讀
- 用“芯”探核:龍芯派開發(fā)實戰(zhàn)
- 計算機組裝與系統(tǒng)配置
- 分布式微服務架構(gòu):原理與實戰(zhàn)
- CC2530單片機技術(shù)與應用
- 單片機系統(tǒng)設(shè)計與開發(fā)教程
- 基于Proteus仿真的51單片機應用
- 單片機開發(fā)與典型工程項目實例詳解
- Managing Data and Media in Microsoft Silverlight 4:A mashup of chapters from Packt's bestselling Silverlight books
- Spring Cloud微服務和分布式系統(tǒng)實踐
- Blender Game Engine:Beginner's Guide
- 計算機電路基礎(chǔ)(第2版)
- 電腦主板維修技術(shù)
- 主板維修實踐技術(shù)
- 計算機組裝與維護
- ActionScript Graphing Cookbook