Spring’s JdbcTemplate and Transactions
Yes, JdbcTemplate is not a substitute for transaction management. You still benefit from database transactions, so userService.updateUser will operate in a database transaction, but if accountService.updateXXX fails, userService.updateUser will not rollback. If you don’t want to use AOP, you can use TransactionTemplate instead. See programmatic transaction management in the Spring Reference Documentation. One pattern I’ve … Read more