private void registerPerformanceMonitor ( String beanName , BeanDefinitionRegistry registry ) { String perfMonitorName = beanName + "PerformanceMonitor" ; if ( ! registry . containsBeanDefinition ( perfMonitorName ) ) { BeanDefinitionBuilder initializer = BeanDefinitionBuilder . rootBeanDefinition ( PerformanceMonitorBean . class ) ; registry . registerBeanDefinition ( perfMonitorName , initializer . getBeanDefinition ( ) ) ; } }
Register a new PerformanceMonitor with Spring if it does not already exist .