Skip to content
Snippets Groups Projects
Commit d2dc0a00 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-14263 : Deadlock on display settings

parent 6d77687b
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -621,6 +621,12 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp
final Session session = sessionManager.getSession(sessionToken);
PersonPE attachedPerson = getDAOFactory().getPersonDAO().tryFindPersonByUserId(session.getUserName());
if(attachedPerson != null)
{
getDAOFactory().getPersonDAO().lock(attachedPerson);
}
return displaySettingsProvider.executeActionWithPersonLock(session.getUserName(), new IDelegatedActionWithResult<SessionContextDTO>()
{
@Override public SessionContextDTO execute(final boolean didOperationSucceed)
......
......@@ -150,6 +150,12 @@ public class GeneralInformationChangingService extends
final PersonPE person = session.tryGetPerson();
if (person != null)
{
PersonPE attachedPerson = getDAOFactory().getPersonDAO().tryFindPersonByUserId(person.getUserId());
if(attachedPerson != null)
{
getDAOFactory().getPersonDAO().lock(attachedPerson);
}
displaySettingsProvider.executeActionWithPersonLock(person, new IDelegatedActionWithResult<Object>()
{
@Override public Object execute(final boolean didOperationSucceed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment