I've tried to find this information in the
Servlet specification but am not able to. Is the order of the handling of events by multiple configured ServletContextListeners guaranteed? In
Tomcat 6.0.26 I've noticed the it seems that initialized events are handled in the same order as the listing of the listeners in the web.xml file. And the destroy events are handled in the reverse order. For example, given the following:
Based on logging, the sequence of events is:
Is this guaranteed by the spec? Or just the way Tomcat is implemented?