Skip to content

GH-30706: Document SqlConfig.TransactionMode values with examples#36897

Open
won-seoop wants to merge 1 commit into
spring-projects:mainfrom
won-seoop:gh-30706-sqlconfig-transactionmode-docs
Open

GH-30706: Document SqlConfig.TransactionMode values with examples#36897
won-seoop wants to merge 1 commit into
spring-projects:mainfrom
won-seoop:gh-30706-sqlconfig-transactionmode-docs

Conversation

@won-seoop

@won-seoop won-seoop commented Jun 10, 2026

Copy link
Copy Markdown

Summary

Expands the Transaction management for @Sql section in the reference manual with practical guidance on choosing between INFERRED and ISOLATED transaction modes.

Changes:

  • Splits the existing single section into two named sub-sections: INFERRED (the default) and ISOLATED
  • Describes the exact inference rules applied under INFERRED: participates in the active test transaction when one is present, otherwise starts and immediately commits a new one
  • Explains the key use case for ISOLATED: when the code under test opens its own transaction and can therefore only see committed data — making the INFERRED mode invisible to it
  • Adds a complete Java + Kotlin example showing the ISOLATED + AFTER_TEST_METHOD cleanup pattern
  • Updates the note on static imports to cover INFERRED in addition to ISOLATED

Related issues

🤖 Generated with Claude Code

…th examples

Expand the "Transaction management for @SQL" section in the reference
manual to explain the practical difference between INFERRED and ISOLATED
transaction modes:

- Split the section into dedicated subsections for each mode
- Document INFERRED behavior: participates in the active test transaction,
  so script changes roll back together with the test method
- Document when to use ISOLATED: when committed data must be visible to
  code that opens its own transaction, along with a cleanup pattern using
  AFTER_TEST_METHOD

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 10, 2026
@sbrannen sbrannen added in: test Issues in the test module type: documentation A documentation task status: waiting-for-feedback We need additional information before we can continue labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: test Issues in the test module status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged or decided on type: documentation A documentation task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants