Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultListableBeanFactory should allow efficient access to current bean names [SPR-12404] #17012

spring-projects-issues opened this issue Nov 1, 2014 · 1 comment
type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Nov 1, 2014

Juergen Hoeller opened SPR-12404 and commented

Improvements based on this proposal and a few discussions with Phil:

On a related but quite different note, we should also avoid synchronization for accessing current bean names. Through managing a dedicated set of manually registered singleton names (which remain stable after the registration phase), we can significantly optimize concurrent access as well as shorten the iteration needed for each autowiring attempt.

Affects: 4.1.1

Issue Links:

  • #17286 ConcurrentModificationException thrown while iterating over bean definition names in DefaultListableBeanFactory#getBeansWithAnnotation(Class<? extends Annotation> annotationType)
  • #18071 ConcurrentModificationException when executing AutowireCapableBeanFactory.createBean
  • #17517 ApplicationContext fails to load in TestNG test if previous test is annotated with @DirtiesContext
  • #17562 Doc: DefaultListableBeanFactory is not thread-safe for manual singleton registration
  • #17266 Restore ability to override bean definition names in DefaultListableBeanFactory subclass
  • #17525 Autowiring against a closed ApplicationContext should consistently fail
  • #19463 getBeanDefinitionNames should not leak the frozenBeanDefinitionNames array

Referenced from: commits 965bea7, 14fef19, 3c3e07e

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 1, 2014

Juergen Hoeller commented

Phil Webb, this is available in master now, also providing public accessors for DLBF's settings.


@spring-projects-issues spring-projects-issues added the type: enhancement label Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.1.2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
type: enhancement
None yet

No branches or pull requests

2 participants