9.14.2 How to set up EntityManager and EntityManagerFactory
You set up the EntityManager and EntityManagerFactory you want to use in an application in an annotation or the DD.
-
EntityManagerFactory settings
-
In an annotation: Specify the settings in @PersistenceUnit.
-
In the DD: Specify the settings in the <persistence-unit-ref> tag.
-
-
EntityManager settings
-
In an annotation: Specify the settings in @PersistenceContext.
-
In the DD: Specify the settings in the <persistence-context-ref> tag.
-
For details on annotations, see 8.12 javax.persistence package. For details on the tags to be set for DD, see the uCosminexus Application Server Definition Reference Guide.