| The traditional middlewares emphasize particularly on solving the complex problems under distributed and heterogeneous environment, the details in Implementing of the system hide by the abstract way to form the "black box" structure. The black box enhances the portability and reusability of program, but it lacks the essential flexibility and adaptability. In order to overcome flaws of the "black box", reflection mechanism is introduced into the design of middleware. It enhances middleware's customizability, reconfigurability and adaptability at run time, adapts the dynamically variable distributed environment and the application requirements well. It has unfolded the good applicational prospect in the field of mobile computing, smart card and multimedia and so on.In view of the insufficiencies in the research and practice on the reflective middleware at present, this article introduces the aspect technology and Dependency Injection into the design of reflective middleware's architecture, which is good for separating the concerns. Because the separation of concerns is the premise of reflection and open implementation, programmers can get the system's concerns by the function decomposition, which can be components, aspects or services. Using AOP to separate the concerns and reversely injecting the dependencies at the right time with DI. Therefore AOP/DI provides the new method for realizing the reflective system's open implementation.Based on reading the domestic and overseas literatures, this paper summarizes the research background and significance of the reflective middleware, the domestic and overseas research development, the relative technologies and concepts and so on. By the analysis and comparison of each kind of techniques' characteristic, the research thinking and the technology and method of the realization are put forward. On the basis of dissertating the relationship among the reflection, RMABAD which is short for "Reflective Middleware Architecture Based on AOP and DI", is presented. It takes micro-kernel, AOP framework and DI container as the core of architecture, uses the meta-programming mechanism to strengthen the reflective power, uses the Bean of EJB to support transaction isolation and remote access, delegates the business logic of EJB to POJO with DI container in order to provide a light way to access EJB. In allusion to JMX's insufficiencies on aspect of managing the dependence relationship among the components, RMABAD expands the JMX with the DI container. It implements the separation invoker on the aspect of remote access and realizes the interceptor chain and the agent switcher with the aid of AOP and DI. With the instance of on-line auction system, the reflection and the feasibility of RMABAD are validated. |