mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +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);
|
||||
if (registry == null)
|
||||
{
|
||||
init();
|
||||
registry = webScriptsRegistryCache.get(tenantDomain);
|
||||
registry = (Registry)registryFactory.getObject();
|
||||
registry.reset();
|
||||
webScriptsRegistryCache.put(tenantDomain, registry);
|
||||
}
|
||||
return registry;
|
||||
}
|
||||
@@ -556,9 +557,6 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
||||
{
|
||||
tenantAdminService.register(this);
|
||||
|
||||
Registry registry = (Registry)registryFactory.getObject();
|
||||
webScriptsRegistryCache.put(tenantAdminService.getCurrentUserDomain(), registry);
|
||||
|
||||
super.reset();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user