Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The persistence unit is the primary unit of runtime configuration. It defines the various pieces of information that the provider needs to know in order to manage the persistent classes during program execution and is configured within a persistence.xml file. There may be one or more persistence.xml files in an application, and each persistence.xml file may define multiple persistence units. There will most often be only one, though. Since there is one EntityManagerFactory for each persistence unit, you can think of the configuration of the persistence unit as the configuration of the factory for that persistence unit.
A common configuration file goes a long way to standardizing the runtime configuration, and the persistence.xml file offers exactly that. While some providers might still require an additional provider-specific configuration file, most will also support their properties being specified within the properties section (described in the "Adding Vendor Properties" section) of the persistence.xml file.