SEBSERV-445 removed synchronized SEB connection cache access

This commit is contained in:
anhefti 2023-05-30 15:40:17 +02:00
parent 48d3e5101c
commit 9708d8610b
2 changed files with 13 additions and 5 deletions

View file

@ -378,9 +378,9 @@ public class ExamSessionServiceImpl implements ExamSessionService {
@Override
public ClientConnectionDataInternal getConnectionDataInternal(final String connectionToken) {
synchronized (ExamSessionCacheService.CLIENT_CONNECTION_CREATION_LOCK) {
return this.examSessionCacheService.getClientConnection(connectionToken);
}
//synchronized (ExamSessionCacheService.CLIENT_CONNECTION_CREATION_LOCK) {
return this.examSessionCacheService.getClientConnection(connectionToken);
//}
}
@Override

View file

@ -314,6 +314,8 @@ public class ExamMonitoringController {
name = API.EXAM_MONITORING_CLIENT_GROUP_FILTER,
required = false) final String hiddenClientGroups) {
final long now = Utils.getMillisecondsNow();
final Exam runningExam = checkPrivileges(institutionId, examId);
final MonitoringSEBConnectionData monitoringSEBConnectionData = this.examSessionService
@ -322,21 +324,27 @@ public class ExamMonitoringController {
createMonitoringFilter(hiddenStates, hiddenClientGroups))
.getOrThrow();
MonitoringFullPageData monitoringFullPageData;
if (this.examAdminService.isProctoringEnabled(runningExam).getOr(false)) {
final Collection<RemoteProctoringRoom> proctoringData = this.examProcotringRoomService
.getProctoringCollectingRooms(examId)
.getOrThrow();
return new MonitoringFullPageData(
monitoringFullPageData = new MonitoringFullPageData(
examId,
monitoringSEBConnectionData,
proctoringData);
} else {
return new MonitoringFullPageData(
monitoringFullPageData = new MonitoringFullPageData(
examId,
monitoringSEBConnectionData,
Collections.emptyList());
}
System.out.println("%%%%%%%% --> monitoring tuck: " + (Utils.getMillisecondsNow() - now));
return monitoringFullPageData;
}
@RequestMapping(