Revert "#1374 - Remove io.ebeaninternal.server.core.ServletContextListener - should be unused"

This reverts commit 95737cd3c5.
This commit is contained in:
rob bygrave
2018-05-27 15:41:51 +12:00
parent ed6a9e2dbb
commit fa4af4ef98
2 changed files with 39 additions and 0 deletions
@@ -0,0 +1,32 @@
package io.ebeaninternal.server.core;
import io.ebeaninternal.server.lib.ShutdownManager;
import javax.servlet.ServletContextEvent;
/**
* Listens for webserver server starting and stopping events.
* <p>
* Register this listener in the web.xml configuration file. This will listen
* for startup and shutdown events.
* </p>
*/
public class ServletContextListener implements javax.servlet.ServletContextListener {
/**
* The servlet container is stopping.
*/
@Override
public void contextDestroyed(ServletContextEvent event) {
ShutdownManager.shutdown();
}
/**
* Do nothing on startup.
*/
@Override
public void contextInitialized(ServletContextEvent event) {
}
}