WSN technologies present significant potential in several application domains. Given the diverse nature of these domains, it is essential that WSNs perform in a reliable and robust fashion. This paper presents methods of integration of autonomic computing principles into WSNs. PSO based clustering for self-optimization and watch mechanism based method for self-protection from black hole attack has been presented in this paper, the paper proposes a novel approach for transactional security with chaos based AES cryptography. Results show that lifetime and throughput of wireless sensor network can be increased using this methods.