Examples of how to execute operations when the application starts up or shuts down using Servlets, CDI and EJB.