How we can registerShutdown hook in web application?
Is there any whays to register it in web.xml or in applicationContext.xml?
I know that if we are using application with main class it's simple.
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("ApplicationContext.xml");
context.registerShutdownHook();
But what about web application? As it uses ContextListener
See Question&Answers more detail:os