I need to read some configuration data from a JSF managed bean and record it to a database, when a web application starts. Ideally I would like to do it in the listener's contextInitialized() method, however, FacesContext is not available at this point.
Which approach would you recommend?
Joined: Feb 06, 2002
It seems there is no way to access facesContext during web app initialization.
facesContext is an object of request scope and cannot be accessed from another thread.
I would do it in ServletContextAttributeListener.attributeAdded(), but managed bean are instantiated lazily.