← Java / Spring · Contents

JAVA-069 / Intermediate

Partial updates due to missing @Transactional

A04:2021 Insecure Design · CWE-362

Why is this a problem?

A mid-operation failure leaves only some changes applied, creating inconsistent state.

How to fix it

java
@Transactional void transfer(...) { debit(); credit(); }

Further reading