Hi. I am using dynamic bean builder with BeanDefinitionBuilder.
I defined singleton as scope, but if a request to create the same bean was defined at the same time, 2 objects are created even though i defined a singleton. Why does this happen? How can i avoid this?

This is the definition i use:
<code>
BeanDefinitionBuilder dBuilder = BeanDefinitionBuilder.rootBeanDefinition(PriorityT askExecutor.class.getName());//UtilsClassPathes.TASK_EXEC_PRIORITY_QUEUE_CLASS_NA ME);
dBuilder.addPropertyValue("queueCapacity", 500);
dBuilder.setScope("singleton");// each matrix has one instance of this type
dBuilder.setLazyInit(true);
</code>

Thanks, Michal