https://bz.apache.org/bugzilla/show_bug.cgi?id=63389
Bug ID: 63389 Summary: Enable Servlet Warmup for Containerization Product: Tomcat 9 Version: 9.0.x Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: isa...@apache.org Target Milestone: ----- Some servlets have longer initialization time than others. In containerizations in general, with Docker being the most popular ATM, it is a common practice to do a Warm Up during building the container image, so that instead of running the servlet for the first time when the container is run, the servlet is initialized while building the container image. That way, the startup time of the container is much faster as there is no need to wait for initialization. Currently, one hack that many use is to launch Tomcat during the container build process, wait for an arbitrary length of time, e.g. 10s or 20s, and then shut Tomcat down. A nice enhancement would be if we could provide a listener which will accept a servlet name as an argument, and will shut down Tomcat as soon as that servlet initialization is completed. A better way would have been to implement this as a ServletContextListener [1], but unfortunately the misnomered method contextInitialized() is called when the context initialization starts and not when it ends. [1] https://docs.oracle.com/javaee/7/api/javax/servlet/ServletContextListener.html -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org