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:
parent
b5d0154bb1
commit
97cc973af0
1 changed files with 0 additions and 5 deletions
|
@ -84,7 +84,6 @@ public class JpaUserSessionPersisterProvider implements UserSessionPersisterProv
|
||||||
entity.setData(model.getData());
|
entity.setData(model.getData());
|
||||||
entity.setBrokerSessionId(userSession.getBrokerSessionId());
|
entity.setBrokerSessionId(userSession.getBrokerSessionId());
|
||||||
em.persist(entity);
|
em.persist(entity);
|
||||||
em.flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -127,7 +126,6 @@ public class JpaUserSessionPersisterProvider implements UserSessionPersisterProv
|
||||||
|
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
em.persist(entity);
|
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);
|
PersistentUserSessionEntity sessionEntity = em.find(PersistentUserSessionEntity.class, new PersistentUserSessionEntity.Key(userSessionId, offlineStr), LockModeType.PESSIMISTIC_WRITE);
|
||||||
if (sessionEntity != null) {
|
if (sessionEntity != null) {
|
||||||
em.remove(sessionEntity);
|
em.remove(sessionEntity);
|
||||||
em.flush();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,8 +173,6 @@ public class JpaUserSessionPersisterProvider implements UserSessionPersisterProv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
em.flush();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue