Add back lock in deleteLocalSession
@@ -206,6 +206,7 @@ public class SessionRepository {
public void deleteLocalSession(LocalSession session) {
long sessionId = session.getSessionId();
+ try (Lock lock = lock(sessionId)) {
log.log(Level.FINE, "Deleting local session " + sessionId);
SessionStateWatcher watcher = sessionStateWatchers.remove(sessionId);
if (watcher != null) watcher.close();
@@ -214,6 +215,7 @@ public class SessionRepository {
deleteLocalSession(session, transaction);
transaction.commit();
}
+ }
/** Add transactions to delete this session to the given nested transaction */
public void deleteLocalSession(LocalSession session, NestedTransaction transaction) {
