Ejemplo n.º 1
0
 /**
  * 用户退出
  *
  * @return
  */
 public void logout() {
   long beginRunTime = 0;
   if (logger.isDebugEnabled()) {
     beginRunTime = System.currentTimeMillis();
     logger.debug("enter logout method.");
   }
   HttpSession currentSession = super.getSession();
   ControlPanelUser controlPanelUser = (ControlPanelUser) super.getCurrentLoginUser();
   if (null != currentSession) {
     currentSession.setAttribute(Constants.LOGIN_CURRENTUSER, null);
     if (null != controlPanelUser) {
       super.getApplication().removeAttribute(controlPanelUser.getVmId());
     }
   }
   fillActionResult(true);
   if (logger.isDebugEnabled()) {
     long takeTime = System.currentTimeMillis() - beginRunTime;
     logger.debug("exit logout method.takeTime:" + takeTime + "ms");
   }
 }