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

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
主站蜘蛛池模板: 太白县| 钟祥市| 绥德县| 鹤山市| 分宜县| 钟山县| 辉县市| 内丘县| 太康县| 鄂伦春自治旗| 郓城县| 区。| 池州市| 安康市| 阳高县| 邵武市| 新兴县| 扶风县| 新干县| 镇巴县| 久治县| 西乌珠穆沁旗| 廉江市| 益阳市| 赫章县| 若尔盖县| 临江市| 博罗县| 怀化市| 长垣县| 二连浩特市| 绥宁县| 老河口市| 房产| 鄂托克旗| 英超| 凯里市| 浮梁县| 肥东县| 铁岭县| 温宿县|