开发者

Automatic Bean Creation

Question: will using

FacesContext context = FacesContext.getCurrentInstance();
Bean bean开发者_如何学Go = (Bean) context.getApplication().evaluateExpressionGet(context, "#{bean}", Bean.class);

cause a new Bean to be instantiated each time the code runs through these statements? Or will it simply refer to the same instance initially created?


It will only create one if not already created yet in the current request/session/application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜