Package io.ebean.event
Class ServletContextListener
- java.lang.Object
-
- io.ebean.event.ServletContextListener
-
- All Implemented Interfaces:
EventListener
,javax.servlet.ServletContextListener
public class ServletContextListener extends Object implements javax.servlet.ServletContextListener
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 ServletContextListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent event)
The servlet container is stopping.void
contextInitialized(javax.servlet.ServletContextEvent event)
Do nothing on startup.
-
-
-
Constructor Detail
-
ServletContextListener
public ServletContextListener()
-
-
Method Detail
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
The servlet container is stopping.- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
Do nothing on startup.- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
-
-