This repository was archived by the owner on Jan 30, 2019. It is now read-only.
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
javax.persistence.EntityManager Injection with @Inject #28
Closed
Description
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