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

Autowired properties can remain unset during concurrent instantiation of prototype-beans [SPR-9806] #14439

spring-projects-issues opened this issue Sep 18, 2012 · 1 comment
in: core type: bug


Copy link

@spring-projects-issues spring-projects-issues commented Sep 18, 2012

Barnabas Bodnar opened SPR-9806 and commented

Autowired properties of prototype-beans referencing singletons can remain unset, if ApplicationContext.getBean(...) is called for the prototype-bean concurrently.
Neither the initialization-type of the singleton, nor the fact, whether the singleton already exists or not, plays a role (i.e. the error occurs even if the singleton is already initialized).

The error is reproducible even with low concurrency-rates (2 threads).

Affects: 3.1.2


Issue Links:

  • #13901 Threading issue in InjectionMetadata.InjectedElement ("is duplicated by")
  • #14485 @Resource injection of singleton in prototype using AnnotationConfigApplicationContext is not thread-safe

Referenced from: commits b79260a, 7fc1629

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 18, 2012

Barnabas Bodnar commented

The attachment contains a minimal environment and code required to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core type: bug
None yet

No branches or pull requests

2 participants