title: Spring 4 recommended replacement of JpaTemplate
body: <p>I have a legacy project which was using Spring 3.0.x and made use of the <code>JpaTemplate</code> implementation provided by Spring.</p>
  
  <p>However, after upgrading to Spring 4.0.x I learned that <code>JpaTemplate</code> was deprecated as of Spring 3.2</p>
  
  <p>I have seen suggestions to simply refactor out the use of <code>JpaTemplate</code> with <code>EntityManager</code>.</p>
  
  <p>However, replacing <code>JpaTemplate</code> with <code>EntityManager</code> is not sufficient as I discovered this project was wrapping the <code>JpaTemplate</code> calls in a <code>JpaCallback</code>, which in turn used entitymanager. I imagine the reason callbacks were used was to allow these DAO calls to be ran asynchronously.</p>
  
  <p>Are there any suggested recommendations on how to refactor applications which make use of JpaTemplate and the JpaCallback class when upgrading to Spring 4?</p>