According to JPA specification, a persistence context is a set of managed entity instances.
Entities are thus managed within a persistence context.
The EntityManager controls the lifecycle of the entities, and these entities can access data store resources.
When a persistence context ends, previously-managed entities become detached. A detached entity is no longer under the control of the EntityManager, and no longer has access to datastore resources.