EDMIService: Add Quartz Scheduler, Add Caching for Datatables
This commit is contained in:
@@ -23,6 +23,7 @@ Public Class WindowsService
|
||||
Private _Archive As EDMI.File.Archive
|
||||
Private _Filesystem As Filesystem.File
|
||||
Private _Global As GlobalState
|
||||
Private _Scheduler As Scheduler
|
||||
|
||||
Public Sub New()
|
||||
ServiceName = SERVICE_NAME
|
||||
@@ -37,6 +38,7 @@ Public Class WindowsService
|
||||
Dim oServicePath As String = AppDomain.CurrentDomain.BaseDirectory
|
||||
|
||||
_LogConfig = New LogConfig(LogConfig.PathType.CustomPath, oServicePath)
|
||||
_LogConfig.Debug = True
|
||||
_Logger = _LogConfig.GetLogger()
|
||||
_Logger.Info("Service {0} is starting...", SERVICE_DISPLAY_NAME)
|
||||
_Logger.Info("ServiceDirectory: {0}", oServicePath)
|
||||
@@ -56,11 +58,15 @@ Public Class WindowsService
|
||||
|
||||
_Archive = New EDMI.File.Archive(_LogConfig)
|
||||
_Filesystem = New Filesystem.File(_LogConfig)
|
||||
_Global = New GlobalState(_LogConfig, _MSSQL_IDB)
|
||||
_Global = New GlobalState(_LogConfig, _MSSQL_IDB, _MSSQL_ECM)
|
||||
_Scheduler = New Scheduler(_LogConfig, _MSSQL_ECM)
|
||||
|
||||
_Logger.Debug("Loading Objectstores")
|
||||
_Global.LoadObjectStores()
|
||||
|
||||
_Logger.Debug("Starting Scheduler")
|
||||
_Scheduler.Start()
|
||||
|
||||
_Logger.Debug("Preparing WCF ServiceHost")
|
||||
EDMIService.MSSQL_ECM = _MSSQL_ECM
|
||||
EDMIService.MSSQL_IDB = _MSSQL_IDB
|
||||
@@ -70,6 +76,7 @@ Public Class WindowsService
|
||||
EDMIService.EDMIArchive = _Archive
|
||||
EDMIService.Filesystem = _Filesystem
|
||||
EDMIService.GlobalState = _Global
|
||||
EDMIService.Scheduler = _Scheduler
|
||||
|
||||
_Logger.Debug("Starting WCF ServiceHost")
|
||||
_ServiceHost = New ServiceHost(GetType(EDMIService))
|
||||
@@ -121,6 +128,8 @@ Public Class WindowsService
|
||||
_ServiceHost.Close()
|
||||
_ServiceHost = Nothing
|
||||
End If
|
||||
|
||||
_Scheduler.Stop()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user