title: @Transactional not working with Spring Boot and JDBC
body: <p>My service should save data to a parent and child database tables, and rollback when an error ocurrs. I've tried forcing an error, using a hardcoded <code>RuntimeException</code>, and found the transaction gets commited no matter what.
  What I'm I missing?
  I'm using Spring Boot 2, including the <code>spring-boot-starter-jdbc</code> dependency.</p>
  
  <p>Database is Oracle 11g.</p>
  
  <p>Main configuration:</p>
  
  <pre><code>@SpringBootApplication
  @EnableTransactionManagement
  public class MyApplication extends SpringBootServletInitializer{
  
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(MyApplication.class);
      }
  
      public static void main(String[] args) {
          SpringApplication.run(MyApplication.class, args);
      }
  }
  </code></pre>
  
  <p>Service layer:</p>
  
  <pre><code>    @Service
      public class MyBean {
  
      private final NamedParameterJdbcTemplate jdbcTemplate;        
      private final MyDAO myDao;
  
      @Autowired
      public MyBean (NamedParameterJdbcTemplate jdbcTemplate, MyDAO myDao) {
          this.jdbcTemplate = jdbcTemplate;
          this.myDao= myDao;
      }
  
      @Override
      @Transactional
      public void saveData(...){
          myDao.saveData(jdbcTemplate, ...);
      }
  
  }
  </code></pre>
  
  <p>DAO:</p>
  
  <pre><code>public void saveData(jdbcTemplate, ...){
      saveDataInParentDatatable(jdbcTemplate, ...);
      saveDataInChildDatatable(jdbcTemplate, ...);
  }
  private void saveDataInChildDatatable(jdbcTemplate, ...){
      throw new RuntimeException();
  }
  </code></pre>