Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deadman Switch for EXE COM Server
Message
 
 
À
13/11/2012 13:11:15
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01556995
Message ID:
01557047
Vues:
53
>>>I have a VFP app that calls a separate EXE COM server. The purpose of the COM server is to obtain and hold an FLOCK() on a production DBF or DBC file.
>>>
>>>Because it is in a separate process (and it must be a separate process, an in-process DLL COM server doesn't work), there is a possibility it could continue to run and hold an FLOCK() on a production table or DBC in the event of the main app crashing in the wrong place. Since the main app runs unattended 24/7, that would be a Very Bad Thing.
>>>
>>>I was thinking of including some sort of watchdog timer/deadman switch in the COM EXE, so it will commit suicide if the parent app doesn't exist or respond (?) within some reasonable amount of time.
>>>
>>>Ideas, anyone?
>>
>>I don't know if that helps you in your situation, but in a similar situation I did the following:
>>The main application creates a file every x minutes on a certain location. The called application that depends on the main application checks if that file exists, and if so, it evaluates the datetime of the create time of that file. If that file is older than a few minutes, the application knows that the crucial app is non-responsive or is not running at all and takes proper action.
>
>I too have used a disk file as a semaphore for non-COM interprocess communication. I'm wondering if, with COM available, there is another technique that is easier or more elegant.

I don't see a disk file solution as non-elegant, as long as it works. It's a matter of taste I think, but at the end what counts is how reliable the solution will be in practice.
Christian Isberner
Software Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform