Our human body is well protected by antibodies from our biological immune system. This protection system matured over millions of years and has proven its functionality. In our research we are transfering techniques of a biological immune system to a computer based environment in order to design a self-protecting middleware which isn't vulnerable to malicious events. First off this paper proposes an artificial immune system (AIS) and evaluates optimal parameter settings. As the first research we show up the correlation between the size of a system and the length of the receptors used within antibodies for an efficient detection. Further on we describe the integration of the immune system into our organic middleware AMUN and afterwards we propose optimization techniques to minimize the memory space needed for storing the antibodies and to speedup the time needed for detecting malicious objects. Categories and Subject Descriptors: C.2.4 [Computer Systems Organization]: Computer-Com...