Hi, I am facing $subject when getting tenant domain using PrivilegedCarbonContext.getCurrentContext().getTenantDomain(true);
due to following logic in PrivilegedCarbonContext. private void resolveTenantDomain(int tenantId) { TenantManager tenantManager = getTenantManager(); if (tenantManager != null) { try { log.debug("Resolving tenant domain from tenant id"); setTenantDomain(tenantManager.getDomain(tenantId)); } catch (UserStoreException ignored) { } } } private TenantManager getTenantManager() { return null; } During carbon context re-factoring someone has mistakenly commented out the logic for getting tenant manager. Because of that it doesn't set tenant domain name and it is always null. I have fixed it to get the TenantManager from UserRealmService as follows, please raise your concerns If you have any. private TenantManager getTenantManager() { try { UserRealmService realmService = dataHolder.getUserRealmService(); if (realmService != null) { return realmService.getTenantManager(); } } catch (Exception ignored) { } return null; } This will fix the above issue. Thanks, KasunW.
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev