/*
   * (non-Javadoc)
   *
   * @see
   * javax.servlet.ServletContextListener#contextInitialized(javax.servlet
   * .ServletContextEvent)
   */
  public void contextInitialized(ServletContextEvent arg0) {
    // Should display a message similar to (where strings wrapped with
    // @'s are replaced at build-time with something meaningful):
    //
    // INFO: Initializing BeanSpy (Build: @VERSION@, Label:@LABEL_NAME@,
    // BuildDate:@BUILD_DATE@)

    theLogger.info(
        new StringBuffer("Initializing BeanSpy (Build: ")
            .append(MsVersion.VERSION)
            .append(", Label: ")
            .append(MsVersion.LABEL_NAME)
            .append(", BuildDate: ")
            .append(MsVersion.BUILD_DATE)
            .append(")")
            .toString());
    theLogger.info("contextInitialized: connecting to JMX Stores");
    JmxStores.connectToJmxStores();
  }
 /*
  * (non-Javadoc)
  *
  * @seejavax.servlet.ServletContextListener#contextDestroyed(javax.servlet.
  * ServletContextEvent)
  */
 public void contextDestroyed(ServletContextEvent arg0) {
   theLogger.info("contextDestroyed: clearing registered JMX stores");
   JmxStores.clearListOfJmxStores();
 }