Is there any mechanism, lifecycle event or callbacks, in Spring or Tomcat to notify once Tomcat server startup is completed? (I have 8 web applications and queues configured
All of the major Tomcat components implement org.apache.catalina.Lifecycle
which includes the ability to add a org.apache.catalina.LifecycleListener
. It sounds like you want the AFTER_START_EVENT
of the Host
.
You configure the listener in server.xml like this:
The class must be packaged in a JAR and the JAR placed in Tomcat's lib directory.