java.lang.Object
org.omnifaces.eventlistener.DefaultServletContextListener
org.omnifaces.ApplicationListener
- All Implemented Interfaces:
ServletContextListener,EventListener
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. - Register
FacesExceptionFilterviaFullAjaxExceptionHandlerif necessary. - Instantiate
Eagerapplication scoped beans and registerEagerBeansWebListenerif necessary. - Register
GraphicImageBeanbeans inGraphicResource. - Register
Socketendpoint if necessary. - Register
Sseendpoint if necessary. - Register
ScriptErrorHandlerservlet if necessary.
When the servlet context is destroyed, this forgets the CDI bean manager which Beans has remembered for this web application.
This is invoked after ApplicationInitializer and before ApplicationProcessor. If any exception is thrown,
then the deployment will fail, unless the "org.omnifaces.SKIP_DEPLOYMENT_EXCEPTION" context parameter is set to true, it will then
merely log a WARNING line.
- Since:
- 2.0
- Author:
- Bauke Scholtz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoid
-
Constructor Details
-
ApplicationListener
public ApplicationListener()
-
-
Method Details
-
contextInitialized
- Specified by:
contextInitializedin interfaceServletContextListener- Overrides:
contextInitializedin classDefaultServletContextListener
-
contextDestroyed
- Specified by:
contextDestroyedin interfaceServletContextListener- Overrides:
contextDestroyedin classDefaultServletContextListener
-