Persistence Context
The JPA unit of managed entity identity and state tracking that coordinates reads, changes, caching, and flush behavior within a defined scope.
Software Engineering Context
A persistence context tracks managed entities and commonly ensures one managed instance per database identity while coordinating dirty checking and flush behavior. Keeping the context unnecessarily large or long-lived can increase memory use and stale-state risk.
Design Boundary
A persistence context is not the database transaction itself. Their lifetimes are often coordinated, but they represent different concepts and may be scoped differently by a framework.