Skip to content

Concurrent creation of the same Configuration class in different contexts is not thread-safe [SPR-10307] #14941

Closed
@spring-projects-issues

Description

@spring-projects-issues

Vivien HENRIET opened SPR-10307 and commented

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.


Affects: 3.1.3, 3.1.4, 3.2.1, 3.2.2

Attachments:

Issue Links:

Referenced from: commits 30b21a9, 6405551, fffeaee

0 votes, 6 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions