Example C and C++ agents are included with Oracle Clusterware that demonstrate using the agent framework to implement high availability agents for applications. Appendix F describes an example of an agent called demoagent1.cpp
. This agent manages a simple resource that represents a file on disk and performs the following tasks:
On start: Creates the file
On stop: Gracefully deletes the file
On check: Detects whether the file is present
On clean: Forcefully deletes the file
To describe this particular resource to Oracle Clusterware, you must first create a resource type that contains all the characteristic attributes for this resource class. In this case, the only attribute to be described is the name of the file to be managed. The following steps demonstrate how to set up the resource and its agent and test the functionality of the resource:
See Also:
Oracle Clusterware Agent Framework C Application Program Interfaces for details of the agent framework, agent framework API reference, and supplied example agents