title: Is there a means of executing code during the startup of Apache Tomcat 6.x to perform initialization routines, etc.?
body: <p>I want to initialize a global instance of a class before my Tomcat server completes startup and begins to offer my servlets.  If this service somehow fails initialization, I'd like the entire startup sequence to fail as well (or as close to this as possible; it would be pointless for the server to be running otherwise).  What's the best way I can accomplish this?  </p>