/*
   * (non-Javadoc)
   *
   * @see
   * javax.servlet.ServletContextListener#contextInitialized(javax.servlet.
   * ServletContextEvent)
   */
  @Override
  public void contextInitialized(ServletContextEvent sce) {
    try {
      List<SysPropertyCategory> categories = dao.getAll(null);
      for (SysPropertyCategory category : categories) {
        Integer categoryId = category.getCategoryId();
        if (categoryId != 16 && categoryId != 17 && categoryId != 18) {

          log.info("load sys_property for {} ", categoryId);
          SysPropertyHelper.load(categoryId);
        }
      }
    } catch (SQLException exception) {
      log.error("load sys_property failed!", exception);
    }

    log.info("load sys_hospital");
    HospitalHelper.load();

    log.info("contextInitialized done!");
  }
 /*
  * (non-Javadoc)
  *
  * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.
  * ServletContextEvent)
  */
 @Override
 public void contextDestroyed(ServletContextEvent sce) {
   SysPropertyHelper.release();
   HospitalHelper.release();
 }