Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

javax.persistence.EntityManager Injection with @Inject #28

Closed
glassfishrobot opened this issue Nov 7, 2011 · 5 comments
Closed

javax.persistence.EntityManager Injection with @Inject #28

glassfishrobot opened this issue Nov 7, 2011 · 5 comments

Comments

@glassfishrobot
Copy link
Contributor

The default injection case:

@PersistenceContext
EntityManager em;

should be also possible with:

@Inject
EntityManager em;

In this case an EntityManager from the single persistence unit defined in the persistence.xml with the TRANSACTED type is going to be injected.

The elements unitName and type should be "replaced" by the Qualifiers:

@Unit("")

and

@Transacted / @Extended
@glassfishrobot
Copy link
Contributor Author

Reported by abien

@glassfishrobot
Copy link
Contributor Author

Was assigned to mvatkina

@glassfishrobot
Copy link
Contributor Author

mvatkina said:
This should be brought up with the JPA spec EG as @PersistentContext is defined by the JPA spec.

@glassfishrobot
Copy link
Contributor Author

Marked as won't fix on Wednesday, February 15th 2012, 4:24:45 pm

@glassfishrobot
Copy link
Contributor Author

This issue was imported from java.net JIRA EJB_SPEC-28

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant