Since ubiquitous applications need situation-aware middleware services and computing environment (e.g., resources) keeps changing as the applications change, it is challenging to detect errors and recover them in order to provide seamless services and avoid a single point of failure. This paper proposes an Adaptive Fault Tolerance (AFT) algorithm in situation-aware middleware framework and presents its simulation model of AFT-based agents.