Skip to content

SpringORM - Scoped proxies for EntityManager injected with @PersistenceContext [SPR-6684] #11350

@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions