Issue Details (XML | Word | Printable)

Key: JPA_SPEC-72
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Oliver Gierke
Votes: 2
Watchers: 1

If you were logged in you would be able to see more operations.

Allow @PersistenceContext to be used on parameters ot enable constructor injection of EntityManagers

Created: 07/Feb/14 11:12 AM   Updated: 25/Mar/14 07:05 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Participants: arjan tijms and Oliver Gierke

 Description  « Hide

Currently it's not possible to inject EntityManagers into constructors as @PersistenceContext is defined to not be allowed on parameters. it would be cool to enable this as users could then design application components using constructor injection only.

arjan tijms added a comment - 25/Mar/14 07:05 PM

Wouldn't this automatically be possible when those contexts can be injected with @Inject?