1

I would like to know when exactly will the JSF framework read the annotation mentioned in Bean and when will it put them in respective Maps, i.e session , request or application .

Is it during server start up or when the concerned JSF page is getting loaded?

Ullas
  • 837
  • 3
  • 10
  • 14

1 Answers1

0

Is it during server start up or when the concerned JSF page is getting loaded?

Only @ManagedBean(eager=true) @ApplicationScoped will be constructed during server startup. All others will be constructed on demand (i.e. when it's been accessed for the first time while no instance exist in the desired scope).

It would not make any sense to autoconstruct request/view/session scoped beans on server's start for the simple reason that every single HTTP request, view and session should have its own instance which is not shared with others across the application. Even more, during server's startup there's no means of any available concrete HTTP request or session.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Thank you very much for the explanation..I had a doubt about session scoped bean..your explanation regarding HTTP request for every user cleared my doubt..Thank you..Have been ur huge fan:) – Ullas Jan 14 '13 at 11:22