While working on that example application. The application is not caring about Transaction. Did any one worked on Transactions can suggest what went wrong in this application? In this if there is any error in child table insert parent table record should also rollback. The rollback doesn't happen.
I wouldn't follow that post. While it works, it isn't the best practice way to do Transactions in Spring.
Transactions should be scoped to a use case, not to an individual database query. This way the entire use case is transactional, and we can share one connection to the database, and if any part of the use case fails it will rollback the transaction for all the database calls in that use case.
I recommend looking at the Spring Framework documentation at www.springframework.org or buy the Spring In Action Edition 3 book.