Container Managed Persistence Context Introduction#
What Is The Container Managed Persistence Context?#
- The
Container Managed Persistence Context- as the name states - is managed by the enterprise container (JEE Container or Spring). The container is responsible forPersistence Contextinjection into enterprise components, and is also responsible for its disposal at the end of the current Transaction.Container-managed persistence contextmight be defined to have one of two different scopes:Transaction persistence scopeorExtended persistence scope. - The container, before performing an operation on the Entity, checks if there is a
Persistence Contextconnected to thetransaction; if not present, it creates a newPersistence Context(session) and connects it. In practice, an EntityManager is automatically created for each newtransaction. Operations such as commits and rollbacks are handled automatically by the Container. - You can find more here
- You can find more here
- You can find more here