Module io.ebean.api

Class ServletContextListener

java.lang.Object
io.ebean.event.ServletContextListener
All Implemented Interfaces:
jakarta.servlet.ServletContextListener, EventListener

@Deprecated(forRemoval=true) public class ServletContextListener extends Object implements jakarta.servlet.ServletContextListener
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated for removal - no intention to replace. Create your own copy of this ServletContextListener if needed for your application.

Listens for webserver server starting and stopping events.

This should be used when the deployment is into a servlet container where the webapp can be shutdown or redeployed without the JVM stopping.

If deployment is into a container where the JVM is completely shutdown (like spring boot, runnable war or when using a servlet container that only contains the single webapp and the JVM is shutdown then this isn't required. Instead we can just rely on the JVM shutdown hook that Ebean registers.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    contextDestroyed(jakarta.servlet.ServletContextEvent event)
    Deprecated, for removal: This API element is subject to removal in a future version.
    The servlet container is stopping.
    void
    contextInitialized(jakarta.servlet.ServletContextEvent event)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Do nothing on startup.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServletContextListener

      public ServletContextListener()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • contextDestroyed

      public void contextDestroyed(jakarta.servlet.ServletContextEvent event)
      Deprecated, for removal: This API element is subject to removal in a future version.
      The servlet container is stopping.
      Specified by:
      contextDestroyed in interface jakarta.servlet.ServletContextListener
    • contextInitialized

      public void contextInitialized(jakarta.servlet.ServletContextEvent event)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Do nothing on startup.
      Specified by:
      contextInitialized in interface jakarta.servlet.ServletContextListener