Skip to content

Delay Repositories initialization in DomainClassConverter [DATACMNS-1734] #2155

@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened DATACMNS-1734 and commented

As reported here the initialization of Repositories during a call to DomainClassConverter.setApplicationContext(…) can cause deadlocks in the context of deferred infrastructure initialization. In the example given, the initialization of the Spring Data JPA MappingContext implementation tries to access the Metamodel provided by the EntityManagerFactory, currently in creation in a separate thread.

We could delay that initialization until the first actual use of the converter to avoid this


Affects: 2.1.17 (Lovelace SR17), 2.2.7 (Moore SR7), 2.3 GA (Neumann)

Reference URL: spring-projects/spring-boot#16230 (comment)

Issue Links:

  • DATACMNS-1743 Translation of URI segments and request parameters into aggregates broken

Referenced from: pull request https://github.com/spring-projects/spring-data-commons/pull/445/files

Backported to: 2.3.1 (Neumann SR1), 2.2.8 (Moore SR8), 2.1.18 (Lovelace SR18)

Metadata

Metadata

Assignees

Labels

in: webIntegration with Spring MVCtype: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions