As a popular infrastructure for distributed systems running on the Internet, middleware has to support much more diverse and complex interactions for coping with the drastically increasing demand on information technology and the extremely open and dynamic nature of the Internet. These supporting mechanisms facilitate the development, deployment, and integration of distributed systems, as well as increase the occasions for distributed systems to interact in an undesired way. The undesired interactions may cause serious problems, such as quality violation, function loss, and even system crash. In this paper, the problem is studied from the perspective of the feature interaction problem (FIP) in telecom, and an online approach to the detection and solution on runtime systems is proposed. Based on a classification of middleware enabled interactions, the existence of FIP in middleware based systems is illustrated by four real cases and a conceptual comparison between middleware based systems and telecom systems. After that, runtime software architecture is employed to facilitate the online detection and solution of FIP. The approach is demonstrated on J2EE (Java 2 Platform Enterprise Edition) and applied to detect and resolve all of the four real cases. feature interaction, middleware, reflective, software architecture