public void contextDestroyed(ServletContextEvent event) {
logger.info("Calling application shutdown...");
VoldemortServer server = (VoldemortServer) event.getServletContext()
.getAttribute(SERVER_KEY);
if(server != null)
server.stop();
logger.info("Destroying application...");
event.getServletContext().removeAttribute(SERVER_KEY);
event.getServletContext().removeAttribute(SERVER_CONFIG_KEY);
event.getServletContext().removeAttribute(VELOCITY_ENGINE_KEY);
}