Fix for concurrency bug found last night, as best as I can tell so far.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4558 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-12-08 03:48:08 +00:00
parent 6ecb0c5728
commit df81a1e14a
4 changed files with 12 additions and 19 deletions

View File

@@ -257,15 +257,11 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
ChildEntry existing = AVMDAOs.Instance().fChildEntryDAO.get(key);
if (existing != null)
{
existing.setChild(node);
AVMDAOs.Instance().fChildEntryDAO.update(existing);
}
else
{
ChildEntry entry = new ChildEntryImpl(key, node);
AVMDAOs.Instance().fAVMNodeDAO.flush();
AVMDAOs.Instance().fChildEntryDAO.save(entry);
AVMDAOs.Instance().fChildEntryDAO.delete(existing);
}
ChildEntry entry = new ChildEntryImpl(key, node);
AVMDAOs.Instance().fAVMNodeDAO.flush();
AVMDAOs.Instance().fChildEntryDAO.save(entry);
}
/**