Jakarta Persistence (JPA) Annotation Type
jakarta.persistence.PersistenceContext
- Implemented Interfaces:
Annotation
- Target:
- Type, Method, Field
Expresses a dependency on a container-managed
EntityManager and its associated persistence context. - Since:
- Jakarta Persistence (JPA) 1.0
Annotation Elements
String name- Default:
- ""
- Since:
- Jakarta Persistence (JPA) 1.0
String unitNameIf the
unitName element is specified, the persistence unit for the entity manager that is accessible in JNDI must have the same name.- Default:
- ""
- Since:
- Jakarta Persistence (JPA) 1.0
- Since:
- Jakarta Persistence (JPA) 1.0
- Default:
SynchronizationType.SYNCHRONIZED
- Since:
- Jakarta Persistence (JPA) 2.1
Vendor specific properties may be included in this set of properties. Properties that are not recognized by a vendor are ignored.
- Default:
- {}
- Since:
- Jakarta Persistence (JPA) 1.0
Additional JDK methods inherited from java.lang.annotation.Annotation
annotationType(), equals(Object), hashCode(), toString()