An Autonomic Computing Mechanism to Enable Self-Protection and Self-Healing