Hitachi

uCosminexus Application Server Compatibility Guide


8.4.2 Types of EntityManager

The types of EntityManager include the container-managed EntityManager and the application-managed EntityManager. The following is a description of each type:

Organization of this subsection

(1) Container-managed EntityManager

The method entrusts the creation and destruction of EntityManager to the container. If you use a container-managed EntityManager, you can code an application without being aware of the generation and destruction of EntityManager. The following points describe how to obtain and how to destroy the container-managed EntityManager.

(2) Application-managed EntityManager

In this method, the application explicitly creates and destroys EntityManager. The life cycle is managed explicitly by application coding. The following points describe how to obtain and how to destroy the application-managed EntityManager.