1. A computer system comprising: a memory storing program instructions that are executable by the computer system to implement: an application that, during execution, dynamically maintains configuration information for the set of resources currently being used by the application, wherein the configuration information includes dependency information describing dependencies among the set of resources; and recovery software that stores one or more previous states of the dynamically maintained configuration information, detects an occurrence of an undesirable state of the application by comparing the application against a set of states predetermined to be acceptable, and, in response to detecting the occurrence of an undesirable state, automatically initiates a restoration of the application on the computer system by restoring the set of resources to a state indicated by one of the stored previous states of the dynamically maintained configuration information, wherein the set of resources are restored in a sequence specified by the dependency information.