Q2How do distributed transactions and @Modifying interact?
JTA/XA coordinates multiple resources atomically using two-phase commit (heavy and blocking), while @Modifying marks a Spring Data @Query as a DML statement that must run inside @Transactional and needs clearAutomatically to avoid stale entities.