From 62c4e404b38dd962b8002c0eb070b162fa2a8352 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 17 Jul 2015 11:09:31 +0200 Subject: [PATCH] enabled db server registrar by default unless the legacy dist calls is enabled. --- src/Umbraco.Core/CoreBootManager.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/CoreBootManager.cs b/src/Umbraco.Core/CoreBootManager.cs index 1a8f72e356..0ebe05565b 100644 --- a/src/Umbraco.Core/CoreBootManager.cs +++ b/src/Umbraco.Core/CoreBootManager.cs @@ -400,9 +400,20 @@ namespace Umbraco.Core new Lazy(() => typeof (IntegerValidator)), }); - //by default we'll use the standard configuration based sync - ServerRegistrarResolver.Current = new ServerRegistrarResolver( - new ConfigServerRegistrar()); + //by default we'll use the db server registrar unless the developer has the legacy + // dist calls enabled, in which case we'll use the config server registrar + if (UmbracoConfig.For.UmbracoSettings().DistributedCall.Enabled) + { + ServerRegistrarResolver.Current = new ServerRegistrarResolver(new ConfigServerRegistrar()); + } + else + { + ServerRegistrarResolver.Current = new ServerRegistrarResolver( + new DatabaseServerRegistrar( + new Lazy(() => ApplicationContext.Services.ServerRegistrationService), + new DatabaseServerRegistrarOptions())); + } + //by default we'll use the database server messenger with default options (no callbacks), // this will be overridden in the web startup