8.6 How to obtain the container-managed EntityManager
To obtain the container-managed EntityManager from the J2EE application, use one of the following methods:
-
Method of injecting EntityManager in the application field and setter method by using the DI
-
Method of looking up EntityManager by using the JNDI from the application
The following sections describe each of the methods.