title: userTransaction rollback method in use?
body: <p>I'm using <code>JBoss JTA 1.1</code></p>
  
  <p>Imagine I have the following DAO method:</p>
  
  <pre><code>public void addEmployee(final Employee e){
      try {
          userTransaction.begin();
      } catch (Exception e1) { }
      final String sql = "INSERT INTO users (name) VALUES(?)";
      KeyHolder kh = new GeneratedKeyHolder();
      JdbcTemplate = getJdbcTemplate(); //Inherited from JdbcDaoSupport
  
      //Some data operations
  
      try {
          userTransaction.rollback(); //Why can use it?
      } catch (Exception e1) { }
  }
  </code></pre>
  
  <p>The issue initially I didn't want to rollbac my changes that were made by the data-operations. Ok, <code>userTransaction.commit();</code> is defenitely useful. But <code>rollback()</code>... why should I deliberately rollback my changes? Couldn't you get an example?</p>