I have the same setup and it works for me.
I can show you my code, although it's similar to the steps shown in the manual
First the DAO implementation:
Code:
@Repository
public class PersonDAOJpaEntityManager implements PersonDAO {
private EntityManager em;
@PersistenceContext
public void setEntityManager(EntityManager em) {
this.em = em;
}
...
}
and here the important parts in the Spring configuration:
<bean id="personDAO" class="com.trivadis.issuesmgmt.dao.impl.PersonDAOJ paEntityManager"/>
<bean class="org.springframework.dao.annotation.Persiste nceExceptionTranslationPostProcessor"/>
<bean class="org.springframework.orm.jpa.support.Persist enceAnnotationBeanPostProcessor"/>
That's all I have. What is the exact error you get ?
I can attach the sample I have, it's not completely stripped down, as it shows both the template based and the Entity Manager approach and also both Hibernate and Toplink essentials.
Guido Schmutz
Principal Consultant, Trivadis Switzerland
Email: guido.schmutz AT trivadis.com