- 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
推薦閱讀
- 龍芯應(yīng)用開發(fā)標(biāo)準(zhǔn)教程
- 辦公通信設(shè)備維修
- 電腦組裝、維護(hù)、維修全能一本通(全彩版)
- 硬件產(chǎn)品經(jīng)理成長手記(全彩)
- 電腦高級(jí)維修及故障排除實(shí)戰(zhàn)
- 筆記本電腦應(yīng)用技巧
- VMware Workstation:No Experience Necessary
- 電腦組裝與維護(hù)即時(shí)通
- 微服務(wù)實(shí)戰(zhàn)(Dubbox +Spring Boot+Docker)
- Drupal Rules How-to
- 計(jì)算機(jī)組裝、維護(hù)與維修項(xiàng)目教程
- 零基礎(chǔ)輕松學(xué)修電腦主板
- FPGA進(jìn)階開發(fā)與實(shí)踐
- Learning Microsoft Cognitive Services
- Nagios系統(tǒng)監(jiān)控實(shí)踐(原書第2版)