title: transactional doesn't rollback
body: <p>I use spring 4.3.9.RELEASE</p>
  
  <p>Some configs and code:</p>
  
  <pre><code>@Configuration
  @EnableTransactionManagement
  public class PersistenceContext {
  
      @Autowired
      private DbConfiguration dbConfiguration;
  
      @Bean(destroyMethod = "close")
      public DataSource dataSource() {
  
          final BoneCPDataSource dataSource = new BoneCPDataSource();
  
          dataSource.setDriverClass(dbConfiguration.getDriverClassName());
          dataSource.setJdbcUrl(dbConfiguration.getUrl());
          dataSource.setUsername(dbConfiguration.getUsername());
          dataSource.setPassword(dbConfiguration.getPassword());
          dataSource.setIdleConnectionTestPeriodInMinutes(dbConfiguration.getIdleConnectionTestPeriod());
          dataSource.setIdleMaxAgeInMinutes(dbConfiguration.getIdleMaxAgeInMinutes());
          dataSource.setMaxConnectionsPerPartition(dbConfiguration.getMaxConnectionsPerPartition());
          dataSource.setMinConnectionsPerPartition(dbConfiguration.getMinConnectionsPerPartition());
          dataSource.setPartitionCount(dbConfiguration.getPartitionCount());
          dataSource.setAcquireIncrement(dbConfiguration.getAcquireIncrement());
          dataSource.setStatementsCacheSize(dbConfiguration.getStatementsCacheSize());
  
          return dataSource;
      }
  
      @Bean(name = "txManager")
      public DataSourceTransactionManager transactionManager() {
          return new DataSourceTransactionManager(dataSource());
      }
  }
  </code></pre>
  
  <p>servlet:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:mvc="http://www.springframework.org/schema/mvc"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xsi:schemaLocation="http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
              http://www.springframework.org/schema/context
              http://www.springframework.org/schema/context/spring-context.xsd
              http://www.springframework.org/schema/mvc
              http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
              http://www.springframework.org/schema/tx
              http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"&gt;
  
      &lt;context:annotation-config/&gt;
  
      &lt;context:component-scan base-package="ru.org.*"/&gt;
  
      &lt;tx:annotation-driven transaction-manager="txManager" /&gt;
  
      &lt;mvc:annotation-driven /&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>WebConfig:</p>
  
  <pre><code>    @Configuration
      @EnableScheduling
      @EnableWebMvc
      @ComponentScan({"ru.org.*"})
      @EnableTransactionManagement
      public class WebConfig extends WebMvcConfigurerAdapter {
  
  
          @Bean
          public MainHandler mainHandler() {
              return new MainHandler();
          }
      }
  </code></pre>
  
  <p>handler:</p>
  
  <pre><code>public class MainHandler extends AbstractUrlHandlerMapping {
  
      @Autowired
      private DataSource dataSource;
  
      protected Object getHandlerInternal(final HttpServletRequest request) throws Exception {
          transactionalTest();
      }
  
      @Transactional(transactionManager = "txManager")
      private void transactionalTest() {
  
          final JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
          jdbcTemplate.execute("INSERT INTO marks(score) VALUES (1);");
          jdbcTemplate.execute("IN3ERT INTO marks(score) VALUES (1);");
      }
  }
  </code></pre>
  
  <p>It throws an exception but no rollback happened. </p>
  
  <p>Also I tried to use <em>rollbackFor</em>-param and throws exactly that exception.</p>
  
  <p>Any ideas?</p>