mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Fixed cache usage pattern for webScriptsRegistryCache
- Code was assuming that an entry put into the cache would be present later on - A full, null or rapidly-expiring cache would cause stack overflow git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17056 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -462,8 +462,9 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
|||||||
Registry registry = webScriptsRegistryCache.get(tenantDomain);
|
Registry registry = webScriptsRegistryCache.get(tenantDomain);
|
||||||
if (registry == null)
|
if (registry == null)
|
||||||
{
|
{
|
||||||
init();
|
registry = (Registry)registryFactory.getObject();
|
||||||
registry = webScriptsRegistryCache.get(tenantDomain);
|
registry.reset();
|
||||||
|
webScriptsRegistryCache.put(tenantDomain, registry);
|
||||||
}
|
}
|
||||||
return registry;
|
return registry;
|
||||||
}
|
}
|
||||||
@@ -556,9 +557,6 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
|||||||
{
|
{
|
||||||
tenantAdminService.register(this);
|
tenantAdminService.register(this);
|
||||||
|
|
||||||
Registry registry = (Registry)registryFactory.getObject();
|
|
||||||
webScriptsRegistryCache.put(tenantAdminService.getCurrentUserDomain(), registry);
|
|
||||||
|
|
||||||
super.reset();
|
super.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user