private void registerProxyCreator ( Node source , BeanDefinitionHolder holder , ParserContext context ) { String beanName = holder . getBeanName ( ) ; String proxyName = beanName + "Proxy" ; String interceptorName = beanName + "PerformanceMonitorInterceptor" ; BeanDefinitionBuilder initializer = BeanDefinitionBuilder . rootBeanDefinition ( BeanNameAutoProxyCreator . class ) ; initializer . addPropertyValue ( "beanNames" , beanName ) ; initializer . addPropertyValue ( "interceptorNames" , interceptorName ) ; BeanDefinitionRegistry registry = context . getRegistry ( ) ; registry . registerBeanDefinition ( proxyName , initializer . getBeanDefinition ( ) ) ; }
Registers a BeanNameAutoProxyCreator class that wraps the bean being monitored . The proxy is associated with the PerformanceMonitorInterceptor for the bean which is created when parsing the methods attribute from the springconfiguration xml file .