I am looking for a solution to replace the @ManagedBean(eager=true)
annotation in JSF 2.2.
I took good note of proposals such as which allow the execution of code at application start up.
I need however to access the FacesContext
, so this solution does not work : FacesContext.getCurrentInstance()
is still null at this time.
I tried to find alternatives to AfterDeploymentValidation
in SPI, but found nothing.
As developpers of DeltaSpike do not seem to plan to implement a substitution to @ManagedBean(eager=true)
and as OmiFaces does not yet support this kind of solution, see. I am sending a message in a bottle.
For the time being, I just access the @ManagedScoped(eager=true)
bean, transformed into a @Named
, in my webapp common xhtml header, but it is kind of ugly.