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

Concurrent creation of the same Configuration class in different contexts is not thread-safe

    XMLWordPrintable

    Details

    • Last commented by a User:
      true

      Description

      The refresh() method of AnnotationConfigApplicationContext is not thread safe anymore.
      It works fine in 3.1.2. The regression has bean introduce with the 3.1.3 release.

      To reproduce:
      -create 2 application contexts
      -register the same configuration class
      -call the refresh method on application context simultaneously

      Now, there is a good chance that both application context share the same beans.

      A small Java program is attached to reproduce the issue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pwebb Phil Webb
              Reporter:
              bubuabu Vivien HENRIET
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 24 weeks, 4 days ago