Example #1
0
        private void registerStateHandlerAnnotationBeanFactoryPostProcessor(Element element, ParserContext context)
        {
            Type clz = typeof(StateHandlerAnnotationBeanFactoryPostProcessor);
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            BeanDefinitionBuilder postProcessorBuilder = BeanDefinitionBuilder.genericBeanDefinition(clz.FullName);

            BeanDefinitionHolder postProcessorHolder = new BeanDefinitionHolder(postProcessorBuilder.BeanDefinition, ActivitiContextUtils.ANNOTATION_STATE_HANDLER_BEAN_FACTORY_POST_PROCESSOR_BEAN_NAME);

            configureProcessEngine(postProcessorBuilder.BeanDefinition, element);
            BeanDefinitionReaderUtils.registerBeanDefinition(postProcessorHolder, context.Registry);
        }
Example #2
0
        private void configureDefaultActivitiRegistry(string registryBeanName, BeanDefinitionRegistry registry)
        {
            if (!beanAlreadyConfigured(registry, registryBeanName, typeof(ActivitiStateHandlerRegistry)))
            {
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
                string registryName = typeof(ActivitiStateHandlerRegistry).FullName;
                log.info("registering a " + registryName + " instance under bean name " + ActivitiContextUtils.ACTIVITI_REGISTRY_BEAN_NAME + ".");

                RootBeanDefinition rootBeanDefinition = new RootBeanDefinition();
                rootBeanDefinition.BeanClassName = registryName;
                rootBeanDefinition.PropertyValues.addPropertyValue("processEngine", this.processEngine);

                BeanDefinitionHolder holder = new BeanDefinitionHolder(rootBeanDefinition, registryBeanName);
                BeanDefinitionReaderUtils.registerBeanDefinition(holder, registry);
            }
        }