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 afterDeploymentValidation
)
{
LOGGER.debug("\n\n\n\n\n\n\n\n\n\n\nafter deployment validation");
}
public void onShutdown(@Observes
BeforeShutdown beforeShutdown
)
{
LOGGER.debug("\n\n\n\n\n\n\n\n\n\n\nbefore shutdown:" + beforeShutdown);
}
I don't see anything in the logs.
What am I missing?