The Java Persistence API handles how relational data is mapped to persistent entity objects, how these objects are stored in a relational database, and how an entity's state is persisted. The Java Persistence API is defined as part of the Java EE 5 specifications, but can also be used in Java SE environments.
The following features are part of the Java Persistence API:
For more on using Java Persistence in Java SE applications and for deploying application to non-Java EE 5 containers, see Adding Support for Java Persistence.
For more about the features of the Java Persistence API, see Chapter 24: Introduction to the Java Persistence API in the Java EE 5 Tutorial.
Although you do not need to specify additional XML descriptors, you have the option of using them as an alternative to annotations or to supplement or override some annotations. Using an XML descriptor might be useful in externalizing object-relational mapping information. Also, multiple XML descriptors can be useful in tailoring object-relational mapping information to different databases.