Mauricio Noda opened SPR-6684 and commented
Instances of EntityManager injected with @PersistenceContext
can´t have scoped proxies in them, creating serialization issues.
The workaround is to declare org.springframework.orm.jpa.support.SharedEntityManagerBean in the XML, configure it with <aop:scoped-proxy /> and them inject with @Autowired
or @Resource
.
Being able to use @PersistenceContext
without the serialization issues would be nice.
Affects: 3.0 GA
Referenced from: commits db71811