官术网_书友最值得收藏!

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
主站蜘蛛池模板: 嘉义市| 德令哈市| 东明县| 龙州县| 唐山市| 寿宁县| 广汉市| 拉孜县| 伽师县| 永福县| 梧州市| 南靖县| 湘潭县| 彩票| 遵义市| 翼城县| 壤塘县| 桂东县| 岳普湖县| 花莲市| 高青县| 屯昌县| 朝阳区| 清苑县| 龙海市| 永泰县| 东山县| 静海县| 伊宁市| 牙克石市| 罗定市| 新巴尔虎右旗| 曲水县| 康保县| 永德县| 屯门区| 桂林市| 慈利县| 五指山市| 铁岭县| 丹寨县|