Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on Sep 18, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Barnabas Bodnar commented

    The attachment concurrent-getbean-with-autowiring.zip contains a minimal environment and code required to reproduce the error.

  2. added
    type: bug
    in: core
    on Jan 11, 2019
  3. added this to the 3.1.3 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions