Skip to content
Ameen Abozaid
Planned lessonJNR-031-L08

Demo: finding the self-invocation bug

  • Lesson 8 of 8
  • Junior
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

diagnose a transaction that never starts; prepares JNR-031-LAB1.

Draft outline details

Step by step

  1. Run the money-transfer exercise: a failure after debit leaves money missing.
  2. Check the code: transfer() calls this.debitAndCredit(), which has the annotation.
  3. Prove it with the transaction log (logging.level.org.springframework.transaction=TRACE): no transaction begins.
  4. Planned mistake: mark the private method @Transactional and show it still does nothing.
  5. Fix it by moving the method to another bean (or annotating the public entry point); re-run the failure test.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.