CDI - Observing Container Events
I am trying to observe both the startup and shutdown events for a CDI web application. I have an ApplicationScoped bean that listens for those events: @ApplicationScoped public class PrettyfacesStartupObserver { private static final Log LOGGER = LogFactory.getLog(PrettyfacesStartupObserver.class); public PrettyfacesStartupObserver() { LOGGER.debug("\n\n\n\n\n\n\n\n\n\nconstructor"); } public void onStartup(@Observes AfterBeanDiscovery afterBeanDiscovery ) { LOGGER.debug("\n\n\n\n\n\n\n\n\n\nafter bean discover"); } public void onStartup(@Observes AfterDeploymentValidation