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

Defensive PersistenceExceptionTranslator bean retrieval in PersistenceExceptionTranslationInterceptor on shutdown #33067

Closed
jhoeller opened this issue Jun 18, 2024 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

Inspired by spring-projects/spring-boot#41092, PersistenceExceptionTranslationInterceptor should defensively retrieve PersistenceExceptionTranslator beans, covering scenarios where the translator has not been initialized before shutdown but a late request starts using the persistence infrastructure during shutdown. It could simply rethrow the original exception as-is in case of a BeanCreationNotAllowedException from detectPersistenceExceptionTranslators.

@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement labels Jun 18, 2024
@jhoeller jhoeller added this to the 6.1.10 milestone Jun 18, 2024
@jhoeller jhoeller self-assigned this Jun 18, 2024
poutsma pushed a commit to poutsma/spring-framework that referenced this issue Jul 3, 2024
poutsma pushed a commit to poutsma/spring-framework that referenced this issue Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant