Mechanisms for adaptively entering and exiting recovery mode. When a
message is received from a particular message transaction, the
appropriate processing instance is loaded from persistent memory to
system memory. The processing instance then determines from its own state
information whether or not it is in recovery mode. This indication of
recovery or normal mode may be set by a system-wide recovery detection
module. If the processing instance determines that it is in normal mode,
then the processing instance executes code appropriate for normal
operation without needing to execute any recovery code at all. If, on the
other hand, the processing instance determines that it is in recovery
mode, then it executes recovery code. Once the recovery code has
completed successfully, the processing instance may then cause its own
normal mode.