Main Page   File List   File Members  

Sample Application Documentation

0.2

This sample application initializes, registers, checks if the registration has completed successfully and then enters a short while loop. After exit from the while loop, it will unregister. The ahm_send_heartbeat() call that is issued after registration is optional. If it is used, it will give the application an indication as to whether or not the registration has been successfully processed within a reasonable amount of time. Since an application may be started without the presence of the heartbeat monitor daemon, it is not always reasonable to terminate the application is registration fails.

The term "registration fails" can refer to several things.

The first is that the registration file is invalid. Check the system log to determine if it is invalid. The file will also be renamed and left in the registration directory so the client may inspect the file.

Second, the registration may have the wrong permissions on the recovery script or the process may not be able to be authenticated. In this case, registration will fail a message will be logged and the registration file will be removed.

The third case is if a heartbeat written to the FIFO is never received by the daemon. In this case, it could mean that the daemon is not running or there are too many applications such that it needs longer time to process the initial registration. This case is not something that the client should definitely terminate for unless it *must* be monitored when it initially starts. In this case, the client should confirm that the daemon is indeed running and try again.


Generated on Wed Oct 30 15:21:17 2002 for Sample Application by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002