title: Transaction configuration for Spring Java configured context
body: <p>I've been struggling with this for a few hours now. </p>
  
  <p>I'm trying to migrate my Spring XML configuration to a full Java based configuration. </p>
  
  <p>I'm using <code>AnnotationConfigApplicationContext</code> as a context implementation. </p>
  
  <p>I'm having trouble finding an Java equivalent for this line, from my old XML configuration: </p>
  
  <pre><code>&lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
  </code></pre>
  
  <p>As a result, Spring doesn't manage the transactions. </p>
  
  <p>In my Java configuration I have initialized the relevant beans for transactions: the session factory, the transactional manager, etc, but without that line, no transaction proxy is used, so no transactions are actually in place. </p>
  
  <p>So my question is how do I either translate that line to my Java context configuration or how to I go about solving the problem in another way. </p>
  
  <p>Any help is appreciated. 
  Thanks. </p>