Cameron Wallace McKenzie wrote:
When does the managed-bean actually initialize
From what I've seen, it's initialized the first time it's needed.
-Cameron McKenzie
Correct. Managed beans are created/initialized on demand. Specifically, session and application scope beans are
not created when the session or application is first created, but rather when the first attempt to reference them is made in a
JSF page request. Which means that if you need these items created in advance, you have to manually construct them in the old-fashioned non-JSF way. Or gimmick up a reference.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.