Stop processes / threads before deploying / stopping an application from Apache Tomcat

Perhaps programmatically to find out when a web application is not installed or stopped from Tomcat, in Java? I need to stop some processes, but without setting up Tomcat, only Java code?

+4
source share
1 answer

Yes. Use ServletContextListener . It will notify you when the context is created and / or destroyed.

+5
source

Source: https://habr.com/ru/post/1387164/


All Articles