Package org.hibernate.jpa

The packages in this namespace are responsible for implementing certain requirements of the JPA specification, especially things which are only needed when Hibernate is acting as a JPA persistence provider.

This package contains an implementation of a JPA PersistenceProvider. You may choose Hibernate as your JPA persistence provider by including the following line in persistence.xml:

When working with the Hibernate persistence provider, keep in mind that:

Thus, Hibernate's many powerful extensions to the JPA specification are always readily accessible.

  • The subpackage org.hibernate.jpa.boot.spi contains the SPI of this persistence provider, including an SPI used to bootstrap the JPA provider, and interfaces which may be implemented to contribute extensions during of the bootstrap process.
  • The package org.hibernate.jpa.event implements support for JPA event listeners.
  • The package org.hibernate.jpa.spi provides SPIs for managing cases where Hibernate intentionally violates the JPA specification by default (something Hibernate only does when it has a really good reason to do so).

Finally, we have two interfaces which enumerate the JPA query hints recognized by Hibernate:

  • SpecHints enumerates the standard hints defined by the JPA specification, and
  • HibernateHints enumerates hints defined by Hibernate.