title: Transaction don' work (Manager tx problem)
body: <p>Good day!
  My problem is when i transferred configuration for another DB from xml to @Bean my transactions is lost.... dont rollback and not work.
  I see this when in DB after first insert created row (!), but in this method(transaction) start second insert i take Exception and row after first inset stay on DB!</p>
  
  <p>This xml</p>
  
  <p>
          
          
          
          
          
      </p>
  
  <pre><code>&lt;bean name="sqlSessionFactoryYarus" class="org.mybatis.spring.SqlSessionFactoryBean"&gt;
      &lt;property name="configLocation" value="/WEB-INF/MapperConfigYarus.xml" /&gt;
      &lt;property name="dataSource" ref="dataSourceYarus" /&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"&gt;
      &lt;property name="basePackage" value="ru.project.crm.mapper_yarus"/&gt;
      &lt;property name="sqlSessionFactoryBeanName" value="sqlSessionFactoryYarus" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="transactionManagerYarus"  class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
      &lt;property name="dataSource" ref="dataSourceYarus" /&gt;
      &lt;qualifier value="yarus"/&gt;
  &lt;/bean&gt;
  
  &lt;tx:annotation-driven transaction-manager="transactionManagerYarus"  /&gt;
  </code></pre>
  
  <p>this code (dataSource there is no this not to waste space)</p>
  
  <pre><code> @Component
   @Scope("singleton")
   @DependsOn("springApplicationContextHolder")
   public class YarusConnectionConfig {
  @Bean
  public SqlSessionFactory sqlSessionFactoryYarus() throws Exception {
      SqlSessionFactoryBean sqlSessionFactory = new SqlSessionFactoryBean();
      sqlSessionFactory.setDataSource(dataSourceYarus());
      sqlSessionFactory.setConfigLocation(new ClassPathResource("../MapperConfigYarus.xml"));
      return sqlSessionFactory.getObject();
  }
  
  @Bean
  public MapperScannerConfigurer yarusMapper() throws Exception {
      MapperScannerConfigurer msc = new MapperScannerConfigurer();
  
      msc.setSqlSessionFactoryBeanName("sqlSessionFactoryYarus");
      msc.setBasePackage("ru.project.crm.mapper_yarus");
      return msc;
  }
  @Bean
  public DataSourceTransactionManager transactionManagerYarus() throws Exception {
      DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager(dataSourceYarus());
      return dataSourceTransactionManager;
  }
  }
  </code></pre>
  
  <p>And </p>
  
  <p>All paces when i want to Transactional annotate @Transactional(value = "transactionManagerYarus")
  And if i build project with xml Transactional works fine
  BUT if build with @Bean its dont work...</p>
  
  <p>Plesae Help me!</p>
  
  <p>I use</p>
  
  <p>1) Spring 4.3</p>
  
  <p>2) MyBatis</p>
  
  <p>3) Postgesql</p>
  
  <p>4) Java 8</p>