- 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
推薦閱讀
- 筆記本電腦使用、維護與故障排除實戰(zhàn)
- 用“芯”探核:龍芯派開發(fā)實戰(zhàn)
- Intel FPGA/CPLD設計(基礎篇)
- Learning Cocos2d-x Game Development
- Cortex-M3 + μC/OS-II嵌入式系統(tǒng)開發(fā)入門與應用
- 深入淺出SSD:固態(tài)存儲核心技術、原理與實戰(zhàn)
- The Applied AI and Natural Language Processing Workshop
- Spring Cloud微服務架構實戰(zhàn)
- Building 3D Models with modo 701
- BeagleBone Robotic Projects
- RISC-V處理器與片上系統(tǒng)設計:基于FPGA與云平臺的實驗教程
- Neural Network Programming with Java(Second Edition)
- FL Studio Cookbook
- Python Machine Learning Blueprints
- FreeSWITCH Cookbook