When a @Transactional method is called from within the same class, Spring's proxy mechanism is bypassed. This self-invocation leads to the method running without the transactional behavior expected, potentially causing data inconsistencies. For instance, if an order processing method in an e-commerce app calls another internal method marked @Transactional directly, any database operations within that method won't be part of the original transaction. To solve this, the method should be invoked through a separate service or use AOP.
Additional Notes
How does self-invocation affect transaction management in Spring?