dbeaver/pro#8894 Workspace dispose and session cleanup fixes (#4256)

* dbeaver/pro#8894 Workspace dispose and session cleanup fixes

* dbeaver/pro#8894 Fix session cleanup

* Revert "dbeaver/pro#8894 Fix session cleanup"

This reverts commit 170882f69d.

* dbeaver/pro#8894 Fix session cleanup
This commit is contained in:
Serge Rider
2026-04-02 11:54:52 +02:00
committed by GitHub
parent b06a96dc31
commit 8cff50b0cf
2 changed files with 4 additions and 5 deletions
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -151,7 +151,7 @@ public abstract class BaseWebSession extends AbstractSessionPersistent {
}
protected synchronized void clearSessionContext() {
this.workspace.getAuthContext().clear();
this.workspace.getAuthContext().clearContext(false);
this.workspace.getAuthContext().addSession(this);
}
@@ -187,12 +187,13 @@ public abstract class BaseWebSession extends AbstractSessionPersistent {
@Override
public void close() {
super.close();
cleanUpSession(true);
super.close();
}
public void close(boolean clearTokens, boolean sendSessionExpiredEvent) {
cleanUpSession(sendSessionExpiredEvent);
super.close();
}
private void cleanUpSession(boolean sendSessionExpiredEvent) {
@@ -492,7 +492,6 @@ public class WebSession extends BaseWebSession
public void close() {
try {
resetNavigationModel();
resetSessionCache();
} catch (Throwable e) {
log.error(e);
}
@@ -509,7 +508,6 @@ public class WebSession extends BaseWebSession
public void close(boolean clearTokens, boolean sendSessionExpiredEvent) {
try {
resetNavigationModel();
resetSessionCache();
} catch (Throwable e) {
log.error(e);
}