[cdi-dev] Review comment: consider allowing NormalScoped EntityManager producers
Donatas
donatas.ciuksys at gmail.com
Fri Mar 10 09:05:04 EST 2017
Section "18.7. Resources" contains:
/The container is not required to support resources with scope other than
@Dependent. Portable applications should not define resources with any scope
other than @Dependent./
Yet the CDI spec itself has examples like the one in section "3.4.2.
Declaring a disposer method":
@Produces *@ConversationScoped* @UserDatabase
public *EntityManager* create(EntityManagerFactory emf) {
return emf.createEntityManager();
}
Most best practices recommend @RequestScoped EntityManager producer (e.g.:
DeltaSpike JPA module: http://deltaspike.apache.org/documentation/jpa.html
<http://deltaspike.apache.org/documentation/jpa.html> ).
Thus please consider explicitly allowing NormalScoped EntityManager
producers.
Donatas
--
View this message in context: http://cdi-development-mailing-list.1064426.n5.nabble.com/Review-comment-consider-allowing-NormalScoped-EntityManager-producers-tp5714560.html
Sent from the CDI Development mailing list mailing list archive at Nabble.com.
More information about the cdi-dev
mailing list