title: Which PlatformTransactionManager used for handling @Transactional in Spring
body: <p>I am trying to figure out an internal mechanism for handling @Transactional by Spring. As I understand transaction is handled by <a href="https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/PlatformTransactionManager.html" rel="nofollow noreferrer">PlatformTransactionManager</a>, which is abstract and has a lot of implementations (JDBC, JTA, JMS etc). But how Spring understand which exactly implementation of PlatformTransactionManager should be used?</p>
  <p>For example I have method marked with @Transactional and inside this method I call jdbc, save to Redis and send message to JMS:</p>
  <pre><code>@Transactional
  public void transactionMethod(){
    saveToSqlDatabase();
    saveToRedis();
    publishToTopic();
  }
  </code></pre>
  <p>How Spring resolve which PlatformTransactionManager should be used?</p>