Skip to content

Provide lock free access to BeanFactory methods by calling BF methods on the AbstractApplicationContext instance directly [SPR-11863] #16482

Closed
@spring-projects-issues

Description

@spring-projects-issues

Lari Hotari opened SPR-11863 and commented

Profiling Grails 2.4.x applications shows a lot of blocking in org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive

There's a discussion about this in SPR-10307 comments.

Juergen suggested to call BeanFactory methods on the BeanFactory instance returned from ConfigurableApplicationContext.getBeanFactory instead of calling the BeanFactory methods available on the AbstractApplicationContext instance. Another way to get hold of the "internal" BeanFactory instead of the ApplicationContext facade is to use BeanFactoryAware for injecting the BeanFactory instance and calling methods on that instance.

However I'd like to be able to use BeanFactory methods directly on the ApplicationContext instance instead without any performance overhead (synchronization).


Affects: 4.0.5

Issue Links:

Referenced from: commits fac2d80

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions