Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9806

Autowired properties can remain unset during concurrent instantiation of prototype-beans

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.1.3, 3.2 RC1
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                bbodnar Barnabas Bodnar
                Last updater:
                Juergen Hoeller
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 9 weeks, 6 days ago