This appendix covers miscellaneous topics on Java Persistence.
persistence.xml file is a simple XML deployment descriptor file that defines a persistence unit. This file configures the name of the
EntityManager service, which manages a set of entity instances. The XML configuration also defines how each
EntityManager connects to the database. A persistence unit may declare one or more uniquely named
The root element of the
persistence.xml file is the
persistence XML element and it contains a set of
persistence-unit XML complex elements.
Here is a simple declaration of
persistence.xml for JPA 2.1:
<persistence version=""2.1"" xmlns=""http://xmlns.jcp.org/xml/ns/persistence"" ...