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

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
主站蜘蛛池模板: 宁国市| 碌曲县| 乐山市| 莱州市| 潮安县| 兴文县| 哈密市| 乐亭县| 乌兰察布市| 贵州省| 道孚县| 贵南县| 沁源县| 木里| 扶余县| 化德县| 台东市| 三亚市| 江口县| 修文县| 个旧市| 炉霍县| 河南省| 阳谷县| 洪泽县| 荃湾区| 舟曲县| 社旗县| 崇文区| 新津县| 金乡县| 图木舒克市| 叶城县| 田林县| 永吉县| 唐河县| 洱源县| 浦东新区| 藁城市| 杭锦旗| 扎赉特旗|