Just thought that I need to post this very useful
article about common transaction mistakes in Java platform. It's just so easy to assume that transaction works and then in the end (or worse, in production), you find out that it does not work as intended. The classic "Transaction Rollback" mistake is surprisingly common. I've seen this again and again as people assume that this would work automatically.