Programmatic Transaction Management
- Allows us to manage transactions through programming in our source code.
- This means hardcoding transaction logic between our business logic.
- We use programming to manage transactions
- Flexible, but difficult to maintain with large amount of business logic. Introduces boilerplate between business logic.
- Preferred when relative less transaction logic is to be introduced.
Declarative Transaction Management
- Allows us to manage transactions through configuration.
- This means separating transaction logic with business logic.
- We use annotations (Or XML files) to manage transactions.
- Easy to maintain. Boilerplate is kept away from business logic.
- Preferred when working with large amount of Transaction logic.