mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-25 16:42:34 +00:00
Remove explicit flush from JPA user and client session handling (#29819)
Closes #29818 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
committed by
GitHub
parent
b5d0154bb1
commit
97cc973af0
@@ -84,7 +84,6 @@ public class JpaUserSessionPersisterProvider implements UserSessionPersisterProv
|
||||
entity.setData(model.getData());
|
||||
entity.setBrokerSessionId(userSession.getBrokerSessionId());
|
||||
em.persist(entity);
|
||||
em.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,7 +126,6 @@ public class JpaUserSessionPersisterProvider implements UserSessionPersisterProv
|
||||
|
||||
if (!exists) {
|
||||
em.persist(entity);
|
||||
em.flush();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +141,6 @@ public class JpaUserSessionPersisterProvider implements UserSessionPersisterProv
|
||||
PersistentUserSessionEntity sessionEntity = em.find(PersistentUserSessionEntity.class, new PersistentUserSessionEntity.Key(userSessionId, offlineStr), LockModeType.PESSIMISTIC_WRITE);
|
||||
if (sessionEntity != null) {
|
||||
em.remove(sessionEntity);
|
||||
em.flush();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,8 +173,6 @@ public class JpaUserSessionPersisterProvider implements UserSessionPersisterProv
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
em.flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user