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

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
主站蜘蛛池模板: 望奎县| 繁昌县| 化德县| 安丘市| 呼和浩特市| 拉孜县| 柳河县| 启东市| 隆化县| 读书| 抚顺市| 普兰店市| 辽阳市| 吴桥县| 潜山县| 北票市| 申扎县| 疏附县| 富源县| 九江市| 深泽县| 驻马店市| 揭阳市| 安陆市| 萍乡市| 蓝山县| 嘉善县| 沅陵县| 浦县| 临西县| 阜城县| 磴口县| 新河县| 同心县| 西盟| 夏河县| 加查县| 金秀| 西畴县| 龙井市| 龙岩市|