diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml index 570d757c9f..d2057a30d2 100644 --- a/config/alfresco/bootstrap-context.xml +++ b/config/alfresco/bootstrap-context.xml @@ -435,6 +435,9 @@ + + + diff --git a/source/java/org/alfresco/repo/descriptor/DescriptorStartupLog.java b/source/java/org/alfresco/repo/descriptor/DescriptorStartupLog.java index ad434cd685..7a58167450 100644 --- a/source/java/org/alfresco/repo/descriptor/DescriptorStartupLog.java +++ b/source/java/org/alfresco/repo/descriptor/DescriptorStartupLog.java @@ -28,6 +28,7 @@ import java.security.Principal; import java.util.Date; import java.util.Map; +import org.alfresco.repo.tenant.TenantService; import org.alfresco.service.descriptor.Descriptor; import org.alfresco.service.descriptor.DescriptorService; import org.alfresco.service.license.LicenseDescriptor; @@ -49,6 +50,7 @@ public class DescriptorStartupLog extends AbstractLifecycleBean // Dependencies private DescriptorService descriptorService; + private TenantService tenantService; /** * @param descriptorService Descriptor Service @@ -58,6 +60,14 @@ public class DescriptorStartupLog extends AbstractLifecycleBean this.descriptorService = descriptorService; } + /** + * @param tenantService Tenant Service + */ + public void setTenantService(TenantService tenantService) + { + this.tenantService = tenantService; + } + /** * Get Organisation from Principal @@ -150,6 +160,12 @@ public class DescriptorStartupLog extends AbstractLifecycleBean Descriptor serverDescriptor = descriptorService.getServerDescriptor(); Descriptor installedRepoDescriptor = descriptorService.getInstalledRepositoryDescriptor(); String serverEdition = serverDescriptor.getEdition(); + + if (tenantService.isEnabled()) + { + serverEdition = serverEdition + " - Multi-Tenant"; + } + String serverVersion = serverDescriptor.getVersion(); int serverSchemaVersion = serverDescriptor.getSchema(); String installedRepoVersion = installedRepoDescriptor.getVersion(); diff --git a/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java b/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java index 3cacd446ba..6a5322f38e 100755 --- a/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java +++ b/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java @@ -180,6 +180,9 @@ public class MultiTAdminServiceImpl extends AbstractLifecycleBean implements Ten // bootstrap Tenant Service internal cache List tenants = getAllTenants(); + int enabledCount = 0; + int disabledCount = 0; + if (tenants != null) { for (Tenant tenant : tenants) @@ -188,11 +191,13 @@ public class MultiTAdminServiceImpl extends AbstractLifecycleBean implements Ten { // this will also call tenant deployers registered so far ... enableTenant(tenant.getTenantDomain(), true); + enabledCount++; } else { // explicitly disable, without calling disableTenant callback disableTenant(tenant.getTenantDomain(), false); + disabledCount++; } } @@ -200,6 +205,12 @@ public class MultiTAdminServiceImpl extends AbstractLifecycleBean implements Ten } userTransaction.commit(); + + if (logger.isInfoEnabled()) + { + logger.info(String.format("Alfresco Multi-Tenant startup - %d enabled tenants, %d disabled tenants", + enabledCount, disabledCount)); + } } catch(Throwable e) {