Package servlet

Class ApplicationLifecycleListener

java.lang.Object
servlet.ApplicationLifecycleListener
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

@WebListener public class ApplicationLifecycleListener extends Object implements javax.servlet.ServletContextListener
Listener that manages application startup and shutdown processes. Initializes background jobs and handles application shutdown.
Author:
TAMIL MUGHILAN
  • Field Details

    • logger

      private static final Logger logger
  • Constructor Details

    • ApplicationLifecycleListener

      public ApplicationLifecycleListener()
  • Method Details

    • contextInitialized

      public void contextInitialized(javax.servlet.ServletContextEvent sce)
      Handles application startup initialization. Starts the job manager and schedules background jobs.
      Specified by:
      contextInitialized in interface javax.servlet.ServletContextListener
      Parameters:
      sce - the servlet context event
    • contextDestroyed

      public void contextDestroyed(javax.servlet.ServletContextEvent sce)
      Handles application shutdown cleanup. Stops background jobs and releases resources.
      Specified by:
      contextDestroyed in interface javax.servlet.ServletContextListener
      Parameters:
      sce - the servlet context event