Question 1: DATA JPA - Basics of @Transactional
What is the primary purpose of the @Transactional annotation in Spring Data JPA?
Question 2: DATA JPA - Default Rollback Behavior
By default, @Transactional in Spring rolls back on which type of exceptions?
Question 3: DATA JPA - Code Snippet (Rollback Example)
What will happen to the database changes in the following method?
Question 4: DATA JPA - Checked Exception Handling
What will happen in this case?
Question 5: DATA JPA - Propagation Behavior
Which propagation type ensures that if a transaction already exists, the method joins it; otherwise, a new one is created?
Question 6: DATA JPA - Code Snippet (REQUIRES_NEW)
What happens in this case?
Question 7: DATA JPA - Isolation Levels
Which isolation level prevents dirty reads but allows non-repeatable reads?
Question 8: DATA JPA - Code Snippet (Transactional ReadOnly)
What effect does @Transactional(readOnly = true) have?
Question 9: DATA JPA - Transaction Propagation Edge Case
What happens if a method annotated with @Transactional(propagation = Propagation.MANDATORY) is called without an existing transaction?
Question 10: DATA JPA - Best Practice for @Transactional Placement
Where is the best place to apply @Transactional in a Spring application?