title: How to use Spring Transaction when using GenericApplicationContext
body: <p>When using Distributed Mysql Database, I've Created multiple dataSources, sessionFactory using BeanDefinitionBuilder
  But transactional annotation doesn't seem to work when I execute Insert SQL 
  using getBean('bean name') method below</p>
  
  <p>( (SqlSessionTemplate)context.getBean('bean name') ).insert("xxxx",params)</p>
  
  <p>Would you explain what I've missed?</p>
  
  <pre><code>Private GenericApplicationContext context = new GenericApplicationContext();
  
  BeanDefinitionBuilder sessionFactoryBuilder = BeanDefinitionBuilder.rootBeanDefinition(org.mybatis.spring.SqlSessionFactoryBean.class);
  sessionFactoryBuilder.addPropertyReference("dataSource", "dataSource" + beanName);
  sessionFactoryBuilder.addPropertyValue("configLocation", "/sqlmap.xml");
  context.registerBeanDefinition("sqlSessionFactory" + beanName, sessionFactoryBuilder.getBeanDefinition());
  
  BeanDefinitionBuilder transactionManagerBuilder = BeanDefinitionBuilder.rootBeanDefinition(org.springframework.jdbc.datasource.DataSourceTransactionManager.class);
  transactionManagerBuilder.addPropertyReference("dataSource", "dataSource" + beanName);
  context.registerBeanDefinition("transactionManager",transactionManagerBuilder.getBeanDefinition());
  
  ctx.refresh();
  </code></pre>