public WNOSService() { InitializeComponent(); try { string serviceDescription, serviceDisplayName, serviceServiceName, serviceDependencies; ProjectInstaller.GetDeploymentConfigItems(out serviceDescription, out serviceDisplayName, out serviceServiceName, out serviceDependencies); this.ServiceName = serviceServiceName; } catch (Exception e) { this.ServiceName = string.Empty; LogManagerEx.GetLogger(this.GetType()).Fatal("Failed to initialize: {0}", ExceptionUtils.ToLongString(e)); } }
public static void Start(string serviceName) { try { _serviceName = serviceName; #if DEBUG //IDbProvider dbProvider = DbProviderFactory.GetDbProvider("OracleClient-2.0"); //dbProvider.ConnectionString = "Data Source=ORA1;User Id=NODE_2008;Password=memorial;"; //SpringBaseDao springBaseDao = new SpringBaseDao(dbProvider); //springBaseDao.RowExists("NAccount", "*", "Id", "0000-0000-0000-0000-0000"); //FileTypeIdentifier.Test(); #endif // DEBUG SecurityUtils.EnableAllSecurityProtocols(); // TLS 1.2 support LOG = LogManagerEx.GetLogger(typeof(WNOSController)); CreateApplicationEventLog(); LogInfo("Calling ContextRegistry.GetContext()"); IApplicationContext ctx = ContextRegistry.GetContext(); LogInfo("Calling ConfigureRemoting()"); ConfigureRemoting(ctx); LogInfo("Locating centralProcessor"); _centralProcessor = (INodeProcessor)ctx["centralProcessor"]; if (_centralProcessor == null) { throw new System.Configuration.SettingsPropertyNotFoundException("centralProcessor"); } LogInfo("Starting centralProcessor"); _centralProcessor.Start(); LogInfo("Exit WNOSController.Start()"); } catch (Exception e) { LogError(e, "Exception thrown in WNOSController.Start()"); throw; } }
public BaseSpringPage() { _logger = LogManagerEx.GetLogger(this.GetType().Name); }