Miner.Responder.WindowsService Assembly > Miner.Responder.WindowsService Namespace > ProgramGroup Class : RecoveryAction Property |
'Declaration <XmlAttributeAttribute()> <DefaultValueAttribute(Mono.Cecil.CustomAttributeArgument)> Public Property RecoveryAction As ProgramRecoveryAction
'Usage Dim instance As ProgramGroup Dim value As ProgramRecoveryAction instance.RecoveryAction = value value = instance.RecoveryAction
[XmlAttribute()] [DefaultValue(Mono.Cecil.CustomAttributeArgument)] public ProgramRecoveryAction RecoveryAction {get; set;}
The reason for having a RecoveryAction of "RestartProgram" is to attempt to maintain the specified program count. While this doesn't make sense when executing "short-lived" programs (such as scripts), it doesn't make for "long-lived" programs.
If the recovery action states that we should restart the program then we have a dilemma: if the program failed as the result of a situation like running out of memory, then restarting the process may resolve the situation (at least temporarily) and get the service back up and running. However, if the failure occurred because of a configuration issue that prevents the program from starting in the first place then we do not want to restart the program because it will simply continue failing since the configuration did not change - leading to an infinite loop of start, exit, start, exit...
We distinguish one situation from the other by restarting the application only if the following conditions are true: 1. (RecoveryAction == ProgramRecoveryAction.RestartProgram) is true 2. program.AllowRestartOnExit() is true
Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)
Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.