Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue May 26, 2020 · 0 comments
Assignees
Labels
in: web Integration with Spring MVC type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Integration with Spring MVC type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants