title: Begin and Rollback transactions with JdbcTemplate
body: <p>i'm working with spring jdbcTemplate in some desktop aplications.</p>
  
  <p>i'm trying to rollback some database operations, but i don't know how can i manage the transaction with this object(JdbcTemplate). I'm doing multiple inserts and updates through a methods sequence. When any operation fails i need  rollback all previous operations.</p>
  
  <p>any idea?</p>
  
  <hr>
  
  <p>Updated... i tried to use @Transactional, but the rolling back doesn't happend.</p>
  
  <p>Do i need some previous configuration on my JdbcTemplate?</p>
  
  <p>My Example:</p>
  
  <pre><code>  @Transactional(rollingbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW)
    public void Testing(){
      jdbcTemplate.exec("Insert into table Acess_Level(IdLevel,Description) values(1,'Admin')");
      jdbcTemplate.exec("Insert into table Acess_Level(IdLevel,Description) values(STRING,'Admin')");
      }
  </code></pre>
  
  <p>The IdLevel is a NUMERIC parameter, so... in our second command will occur an exception. When i see the table in database, i can see the first insert... but, i think this operation should be roll back.</p>
  
  <p>what is wrong?</p>