This paper presents the design, implementation and evaluation of Jade, an environment for autonomic management of legacy software infrastructures. This environment relies on two main frameworks: a framework for the encapsulation of administrable resources, which provides the administered system's resources with a uniform management interface; and a framework for autonomic managers, which regulates a set of managed resources for a specific management aspect. We report on our experiments with self-optimization and self-repair for a J2EE application deployed in a cluster of machines. MOTS-CL