Skip to content

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

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

Closed
spring-projects-issues opened this issue Sep 18, 2012 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

Attachments:

Issue Links:

Referenced from: commits b79260a, 7fc1629

@spring-projects-issues
Copy link
Collaborator Author

Barnabas Bodnar commented

The attachment concurrent-getbean-with-autowiring.zip 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
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants