Grokking Spring Boot
Vote

0% completed

​

The Self-Invocation Trap

A self-invocation is a call from one method of an object to another method of the same object. In Java it goes through this, the reference every object holds to itself, whether or not the code writes this out.

For most code, that detail never matters. For a @Transactional method, it decides whether a transaction exists at all: called from outside its class, the method runs in a transaction, and called from inside, it runs without one.

What follows shows that failure in the booking service, rebuilds it in plain Java, and compares three ways to avoid it.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content