Search code examples
javajakarta-eetransactionsjtadistributed-transactions

What is a transaction boundary?


I've read this article (assumes I already know what a transaction boundary is) and this SO question (can't decipher meaning of transaction boundary from that question). In other words, there are no clear definitions or attempts at definitions for transaction boundary that I have found. I understand what a transition is 100%, but what is a transaction boundary conceptually?


Solution

  • It's where the transaction starts or is committed/rollbacked.

    A method annotated with @Transactional for example defines two transaction boundaries: when the method is called, a transaction starts, and when it returns, the transaction is committed/rollbacked.