diff --git a/src/Umbraco.Core/Runtime/MainDom.cs b/src/Umbraco.Core/Runtime/MainDom.cs index d784560f2c04..b5404c62b2c5 100644 --- a/src/Umbraco.Core/Runtime/MainDom.cs +++ b/src/Umbraco.Core/Runtime/MainDom.cs @@ -19,7 +19,7 @@ namespace Umbraco.Core.Runtime /// When an AppDomain starts, it tries to acquire the main domain status. /// When an AppDomain stops (eg the application is restarting) it should release the main domain status. /// - internal class MainDom : IMainDom, IRegisteredObject, IDisposable + public class MainDom : IMainDom, IRegisteredObject, IDisposable { #region Vars diff --git a/src/Umbraco.Core/Runtime/SqlMainDomLock.cs b/src/Umbraco.Core/Runtime/SqlMainDomLock.cs index 12359c96d102..8e38fa74c418 100644 --- a/src/Umbraco.Core/Runtime/SqlMainDomLock.cs +++ b/src/Umbraco.Core/Runtime/SqlMainDomLock.cs @@ -18,7 +18,7 @@ namespace Umbraco.Core.Runtime { - internal class SqlMainDomLock : IMainDomLock + public class SqlMainDomLock : IMainDomLock { private readonly TimeSpan _lockTimeout; private string _lockId; @@ -33,14 +33,14 @@ internal class SqlMainDomLock : IMainDomLock private object _locker = new object(); private bool _hasTable = false; - public SqlMainDomLock(ILogger logger) + public SqlMainDomLock(ILogger logger, string connectionStringName = Constants.System.UmbracoConnectionName) { // unique id for our appdomain, this is more unique than the appdomain id which is just an INT counter to its safer _lockId = Guid.NewGuid().ToString(); _logger = logger; _dbFactory = new UmbracoDatabaseFactory( - Constants.System.UmbracoConnectionName, + connectionStringName, _logger, new Lazy(() => new MapperCollection(Enumerable.Empty()))); diff --git a/src/Umbraco.Web/UmbracoApplication.cs b/src/Umbraco.Web/UmbracoApplication.cs index c96e21e34870..563d553ac25a 100644 --- a/src/Umbraco.Web/UmbracoApplication.cs +++ b/src/Umbraco.Web/UmbracoApplication.cs @@ -76,7 +76,7 @@ protected virtual string GetBootErrorFileName() /// /// Returns a new MainDom /// - protected IMainDom GetMainDom(ILogger logger) + protected virtual IMainDom GetMainDom(ILogger logger) { // Determine if we should use the sql main dom or the default var appSettingMainDomLock = ConfigurationManager.AppSettings[Constants.AppSettings.MainDomLock];