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