O'Reilly logo

Spring Persistence with Hibernate by Ahmad Seddighi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JPA configuration

The JPA compatible EntityManager is configured through the persistence.xml file located in the META-INF directory of the classpath. The persistence.xml file starts with the XML declaration and the persistence element as root. The root defines the schema, determining the version of JPA according to which the document is created. Inside the root element, an unlimited number of persistence-unit elements can be present. In most situations, only a single persistence-unit element is used. However, in rare situations when you are using two or more persistence strategies together in your application (for example, Hibernate for persisting some classes and iBatis for others), you can distinct them with individual persistence-unit elements. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required