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
|
//clear context, invalidate session
|
||||||
Env.getCtx().clear();
|
Env.getCtx().clear();
|
||||||
Adempiere.getThreadPoolExecutor().schedule(() -> {
|
Adempiere.getThreadPoolExecutor().schedule(() -> {
|
||||||
((SessionCtrl)session).invalidateNow();
|
try {
|
||||||
desktop.setAttribute(DESKTOP_SESSION_INVALIDATED_ATTR, Boolean.TRUE);
|
((SessionCtrl)session).invalidateNow();
|
||||||
try {
|
} catch (Throwable t) {
|
||||||
desktopCache.removeDesktop(desktop);
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (desktopCache.getDesktopIfAny(desktop.getId()) != null) {
|
||||||
|
desktop.setAttribute(DESKTOP_SESSION_INVALIDATED_ATTR, Boolean.TRUE);
|
||||||
|
desktopCache.removeDesktop(desktop);
|
||||||
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue