Make bootstrap for AVMLockingService more robust. Fixed AVMLockingServiceTest failures.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6035 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-06-20 15:19:02 +00:00
parent b6149b20a2
commit 1073576c12
2 changed files with 41 additions and 0 deletions

View File

@@ -169,6 +169,21 @@ public class AVMLockingServiceImpl implements AVMLockingService
Attribute table = fAttributeService.getAttribute(LOCK_TABLE);
if (table != null)
{
Attribute stores = fAttributeService.getAttribute(LOCK_TABLE + '/' + STORES);
if (stores == null)
{
fAttributeService.setAttribute(LOCK_TABLE, STORES, new MapAttributeValue());
}
Attribute users = fAttributeService.getAttribute(LOCK_TABLE + '/' + USERS);
if (users == null)
{
fAttributeService.setAttribute(LOCK_TABLE, USERS, new MapAttributeValue());
; }
Attribute webProjects = fAttributeService.getAttribute(LOCK_TABLE + '/' + WEB_PROJECTS);
if (webProjects == null)
{
fAttributeService.setAttribute(LOCK_TABLE, WEB_PROJECTS, new MapAttributeValue());
}
return null;
}
fAttributeService.setAttribute("", LOCK_TABLE, new MapAttributeValue());