IDEMPIERE-5049 Zk Session and Desktop object not destroy immediately after logout (#1151)
Fix "zkoss.removeDesktop:70: Removing non-existent desktop: [Desktop z_7zm:/index.zul]" warning at server log.
This commit is contained in:
parent
7689183b49
commit
8780884ef3
|
@ -192,10 +192,16 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
//clear context, invalidate session
|
||||
Env.getCtx().clear();
|
||||
Adempiere.getThreadPoolExecutor().schedule(() -> {
|
||||
((SessionCtrl)session).invalidateNow();
|
||||
desktop.setAttribute(DESKTOP_SESSION_INVALIDATED_ATTR, Boolean.TRUE);
|
||||
try {
|
||||
((SessionCtrl)session).invalidateNow();
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
try {
|
||||
if (desktopCache.getDesktopIfAny(desktop.getId()) != null) {
|
||||
desktop.setAttribute(DESKTOP_SESSION_INVALIDATED_ATTR, Boolean.TRUE);
|
||||
desktopCache.removeDesktop(desktop);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue