- java.lang.Object
-
- org.omnifaces.eventlistener.DefaultServletContextListener
-
- org.omnifaces.ApplicationListener
-
- All Implemented Interfaces:
ServletContextListener,EventListener
@WebListener public class ApplicationListener extends DefaultServletContextListener
OmniFaces application listener. This runs when the servlet context is created. This performs the following tasks:
- Check if Faces 3.0 is available, otherwise log and fail.
- Check if CDI 3.0 is available, otherwise log and fail.
- Load
Cacheprovider and register its filter if necessary. - Add
FacesViewsmappings to FacesServlet if necessary. - Add
ViewResourceHandlermapping to FacesServlet if necessary. - Instantiate
Eagerapplication scoped beans and registerEagerBeansWebListenerif necessary. - Register
GraphicImageBeanbeans inGraphicResource. - Register
Socketendpoint if necessary.
This is invoked after
ApplicationInitializerand beforeApplicationProcessor. If any exception is thrown, then the deployment will fail, unless the "org.omnifaces.SKIP_DEPLOYMENT_EXCEPTION" context parameter is set totrue, it will then merely log a WARNING line.- Since:
- 2.0
- Author:
- Bauke Scholtz
-
-
Constructor Summary
Constructors Constructor Description ApplicationListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextInitialized(ServletContextEvent event)-
Methods inherited from class org.omnifaces.eventlistener.DefaultServletContextListener
contextDestroyed
-
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(ServletContextEvent event)
- Specified by:
contextInitializedin interfaceServletContextListener- Overrides:
contextInitializedin classDefaultServletContextListener
-
-