Skip to content

Groovy Control Bus should skip non-singleton managed beans during script variables initialization [INT-2164] #6129

@spring-operator

Description

@spring-operator

Artem Bilan opened INT-2164 and commented

When in the application context exist some beans with scope +request+ or +session+ GroovyControlBusFactoryBean thorws Exception on

 
Object bean = this.beanFactory.getBean(name);

if command-message received from some queue channel, because RequestContext doesn't exist.
Especially: I think there is no any reason to use beans from custom scopes as ManagedResource.
So, it is solution:

 
for (String name : this.beanFactory.getBeanDefinitionNames()) {
  BeanDefinition def = ctxt.getBeanFactory().getBeanDefinition(name);  
  if (!def.isSingleton() || def.isAbstract()) continue;

Affects: 2.1 M3

Issue Links:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions