I wanted to do commit and rollback using jdbcTemplate.
My question is based on this thread
How do I commit or rollback, should I do it on jdbcTemplate like
the easiest way of managing transactions in spring is @Transactional annotation, so your code will look very simple:
@Transactional(rollbackFor = Exception.class)
public void doSomething(...) {
...
}
read more: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html