Skip to content

Allow any @Transactional propagation for @TransactionalEventListener with BEFORE_COMMIT phase #35150

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

carsago
Copy link

@carsago carsago commented Jul 3, 2025

Following discussions in #30679 and #31414, validation was added to restrict @TransactionalEventListener to only use @Transactional(propagation = Propagation.REQUIRES_NEW) or @Transactional(propagation = Propagation.NOT_SUPPORTED).

However, this validation is unnecessary when the @TransactionalEventListener phase is BEFORE_COMMIT (excluding propagation NEVER). While removing the @Transactional would solve the issue, this creates unnecessary friction when upgrading Spring versions.

carsago added 2 commits July 3, 2025 20:07
Signed-off-by: carsago <ohseo8813@gmail.com>
Signed-off-by: carsago <ohseo8813@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged or decided on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants