开发者

JSF Controller Bean - Scoping

WI have a question about the "Best Practice" Design for controller beans.

I was reading this very good question and the linking arti开发者_JS百科cle:

Question "JSF backing bean structure (best practices)" Scoping Best Practice

Online Article Distinctions between different kinds of JSF Managed-beans

My question is concerning the controller bean. I'm using JSF / Spring and was wondering why I would want to use request scope for Controller beans?

The controller logic being defined as "...execute some kind of business logic and return navigation outcome.." I would think doesn't require a request scope but either session/application scope. Why keep creating those controller objects on every request?

In my case I would create the controller bean in the faces-config obviously and inject it with my managed properties through spring.

Thoughts please around the scoping? Thanks.

Clarification: Using JSF 1.2, Spring 3. Using faces-config.xml to declare my beans. Not through annotations.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜