Abstract:Internet provides an open and dynamic operating environment for distributed applications. In order to make middleware which, as a distributed application’s major infrastructure, supports run-time monitoring and adjusts the system’s internal state, structure and behavior, and can make proper adjustment for application's properties and behavior in the process of running. This paper takes the advantages of AOP and computational reflection, and AspectLua integrated into the middleware, and middleware application configuration information prepared using Lua, allowing the middleware to have better self-adaptability.