@Override
 public String restart() {
   Map<String, Resettable> resettables = BeanUtils.getBeansOfClass(Resettable.class);
   for (String name : resettables.keySet()) {
     if (logger.isDebugEnabled()) {
       logger.debug("trying to reset bean [" + name + "]...");
     }
     Resettable bean = resettables.get(name);
     if (bean == null) {
       throw new ConfigException(
           "bean [" + name + "] is null, " + "application can not be restarted.");
     }
     bean.reset();
     if (logger.isDebugEnabled()) {
       logger.debug("bean [" + name + "] was reset.");
     }
   }
   if (!isPortletMode()) {
     // it is always this case !
     ExceptionUtils.unmarkExceptionCaught();
     ((HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false))
         .invalidate();
   }
   return "applicationRestarted";
 }