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

Concurrent retrieval of prototype-scoped beans may result in null @Autowired fields

    Details

    • Type: Bug
    • Status: Waiting for Feedback
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1 GA
    • Fix Version/s: Waiting for Triage
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      I am hesitant to put it here because it is so hard to believe. But basically we have a prototype bean (marked through @Scope annotation) with a

      {{
      private transient SomeService service;

      @Autowired
      public void setSomeService()

      { ... } }}

      Several of such beans are concurrently retrieved from the application context. And sporadically, but reproducibly , for one of them service would be null. I have removed transient modifier and I cannot reproduce it anymore...

      It would be interesting to hear Juergen's comment on this. Is this even in the realm of possibility that a transient modifier could matter???

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kyrill007 Kyrill Alyoshin
                Last updater:
                Chris Beams
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

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