@Override
  public void callContextInitialized(ServletContextListener l, ServletContextEvent e) {
    try {
      // toggle state of the dynamic API so that the listener cannot use it
      if (isProgrammaticListener(l)) this.getServletContext().setEnabled(false);

      super.callContextInitialized(l, e);
    } finally {
      // untoggle the state of the dynamic API
      this.getServletContext().setEnabled(true);
    }
  }