From 7a010a28361e55394df2b51dff01bc771361601e Mon Sep 17 00:00:00 2001 From: Jan Vonka Date: Fri, 20 Mar 2009 10:10:01 +0000 Subject: [PATCH] ETHREEOH-1548 - remove tenant domain threadlocal git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13698 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/config/xml/RepoXMLConfigService.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/repo/config/xml/RepoXMLConfigService.java b/source/java/org/alfresco/repo/config/xml/RepoXMLConfigService.java index bb8edb4b26..1463cd1538 100644 --- a/source/java/org/alfresco/repo/config/xml/RepoXMLConfigService.java +++ b/source/java/org/alfresco/repo/config/xml/RepoXMLConfigService.java @@ -75,7 +75,6 @@ public class RepoXMLConfigService extends XMLConfigService implements TenantDepl private SimpleCache configDataCache; // used to reset the cache - private ThreadLocal tenantDomainThreadLocal = new ThreadLocal(); private ThreadLocal configDataThreadLocal = new ThreadLocal(); public void setTransactionService(TransactionService transactionService) @@ -195,8 +194,7 @@ public class RepoXMLConfigService extends XMLConfigService implements TenantDepl ConfigData configData = getConfigDataLocal(tenantDomain); if (configData == null) { - configData = new ConfigData(); - this.tenantDomainThreadLocal.set(tenantDomain); + configData = new ConfigData(tenantDomain); this.configDataThreadLocal.set(configData); } @@ -320,7 +318,7 @@ public class RepoXMLConfigService extends XMLConfigService implements TenantDepl ConfigData configData = this.configDataThreadLocal.get(); // check to see if domain switched (eg. during login) - if ((configData != null) && (tenantDomain.equals(tenantDomainThreadLocal.get()))) + if ((configData != null) && (tenantDomain.equals(configData.getTenantDomain()))) { return configData; // return threadlocal, if set } @@ -451,6 +449,18 @@ public class RepoXMLConfigService extends XMLConfigService implements TenantDepl private List configDeployments; + private String tenantDomain; + + public ConfigData(String tenantDomain) + { + this.tenantDomain = tenantDomain; + } + + public String getTenantDomain() + { + return tenantDomain; + } + public ConfigImpl getGlobalConfig() { return globalConfig;