In order to use JPA in a Java application, the entity beans require configuration for the data source and the persistence context. The persistence context is a file named
persistence.xml, and it is found in the
META-INF/ folder of Java Archive.
A persistence configuration XML file defines a collection of the persistence units. There must be at least one persistence unit in the file for it to be useful. A persistence unit represents a persistence context in the application, and it has a name. The name is used in an application to link
EntityManager with the persistence unit. The linkage is defined with the
A persistence ...