EDMI: Include Doctypes in ClientConfig

This commit is contained in:
Jonathan Jenne
2022-02-04 16:49:05 +01:00
parent d8b1b7e2b7
commit 67852d4572
19 changed files with 1564 additions and 1357 deletions

View File

@@ -34,7 +34,7 @@ Public Class WindowsService
Run(New WindowsService())
End Sub
Protected Overrides Sub OnStart(ByVal args As String())
Protected Overrides Sub OnStart(args As String())
Try
' Init
Dim oServicePath As String = AppDomain.CurrentDomain.BaseDirectory
@@ -65,11 +65,11 @@ Public Class WindowsService
LogConfig.Debug = ConfigManager.Config.Debug
LogConfigScheduler.Debug = ConfigManager.Config.Debug
Logger.Debug("Connecting to Databases")
Logger.Info("Connecting to Databases..")
Firebird = StartFirebird()
MSSQL_ECM = GetMSSQL_ECM(LogConfig)
MSSQL_IDB = GetMSSQL_IDB(LogConfig)
Logger.Info("Connection to Databases established!")
Logger.Debug("Initializing EDMI Functions")
Archive = New EDMI.File.Archive(LogConfig)
@@ -79,18 +79,16 @@ Public Class WindowsService
Dim oMSSQLServer = GetMSSQL_ECM(LogConfigScheduler)
Scheduler = New Scheduler(LogConfigScheduler, oMSSQLServer, GlobalState.TableStore)
Logger.Debug("Loading Global Data")
Logger.Info("Loading Global Data")
GlobalState.LoadObjectStores()
GlobalState.LoadConnections()
GlobalState.LoadDoctypes()
GlobalState.LoadClientConfig(Config)
Logger.Debug("Loading Client Config")
Logger.Debug("ForceDirectDatabaseAccess: {0}", Config.ClientConfig.ForceDirectDatabaseAccess)
GlobalState.ClientConfig = Config.ClientConfig
Logger.Debug("Starting Scheduler")
Logger.Info("Starting Scheduler")
Scheduler.Start()
Logger.Debug("Preparing WCF ServiceHost")
Logger.Info("Preparing WCF ServiceHost")
EDMIService.MSSQL_ECM = MSSQL_ECM
EDMIService.MSSQL_IDB = MSSQL_IDB
EDMIService.Firebird = Firebird
@@ -101,7 +99,7 @@ Public Class WindowsService
EDMIService.GlobalState = GlobalState
EDMIService.Scheduler = Scheduler
Logger.Debug("Starting WCF ServiceHost")
Logger.Info("Starting WCF ServiceHost")
Dim oBaseAddresses() As Uri = {New Uri(SERVICE_BASE_ADDRESS)}
ServiceHost = New ServiceHost(Of EDMIService)(oBaseAddresses)
@@ -116,10 +114,11 @@ Public Class WindowsService
Logger.Debug("Contract: {0}", oEndpoint.Contract.Name)
Next
Logger.Debug("Starting WFC ServiceHost..")
ServiceHost.Open()
Logger.Debug("WCF ServiceHost started!")
Logger.Info("WCF ServiceHost started")
Logger.Info("Service {0} successfully started", SERVICE_DISPLAY_NAME)
Logger.Info("Service {0} successfully started!", SERVICE_DISPLAY_NAME)
Catch ex As Exception
Logger.Warn("Unexpected Error while starting the service: {0}", ex.Message)
Logger.Error(ex)