Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD

42431: Fix to initialisation code that can cause patches such as ActivitiesTemplatesUpdatePatch that access beans such as Repository before the spring bean init lifecycle has completed to fail.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@42435 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2012-10-08 14:44:09 +00:00
parent adeb08d0c0
commit 4a6e3a5413

View File

@@ -76,9 +76,8 @@ public class Repository implements ApplicationContextAware, ApplicationListener,
// company home
private StoreRef companyHomeStore;
private String companyHomePath;
private Map<String, NodeRef> companyHomeRefs;
private Map<String, NodeRef> rootRefs;
final private Map<String, NodeRef> companyHomeRefs = new ConcurrentHashMap<String, NodeRef>();
final private Map<String, NodeRef> rootRefs = new ConcurrentHashMap<String, NodeRef>();
/**
@@ -199,20 +198,9 @@ public class Repository implements ApplicationContextAware, ApplicationListener,
{
tenantAdminService.register(this);
if (companyHomeRefs == null)
{
companyHomeRefs = new ConcurrentHashMap<String, NodeRef>(4);
}
if (rootRefs == null)
{
rootRefs = new ConcurrentHashMap<String, NodeRef>(4);
}
getCompanyHome();
}
/**
* Gets the root home of the company home store
*