Package org.omnifaces
Class ApplicationListener
- 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
Cache
provider and register its filter if necessary. - Add
FacesViews
mappings to FacesServlet if necessary. - Add
ViewResourceHandler
mapping to FacesServlet if necessary. - Instantiate
Eager
application scoped beans and registerEagerBeansWebListener
if necessary. - Register
GraphicImageBean
beans inGraphicResource
. - Register
Socket
endpoint if necessary.
This is invoked after
ApplicationInitializer
and 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 void
contextInitialized(ServletContextEvent event)
-
Methods inherited from class org.omnifaces.eventlistener.DefaultServletContextListener
contextDestroyed
-
-
-
-
Method Detail
-
contextInitialized
public void contextInitialized(ServletContextEvent event)
- Specified by:
contextInitialized
in interfaceServletContextListener
- Overrides:
contextInitialized
in classDefaultServletContextListener
-
-