Hibernate Reactive

The reactive API for Hibernate ORM.

Add a reactive API to Hibernate ORM, supporting non-blocking database drivers and a reactive style of interaction with the database.

Reactive Object/Relational Mapping

Hibernate Reactive is a reactive API for Hibernate ORM, supporting non-blocking database drivers and a reactive style of interaction with the database.

Hibernate Reactive is intended for use in a reactive programming environment like Vert.x or Quarkus, where interaction with the database should occur in a non-blocking fashion. Persistence operations are orchestrated via the construction of a reactive stream rather than via direct invocation of synchronous functions in procedural Java code.

JDBC, JPA and Hibernate ORM use blocking IO for interaction with the database, and are therefore not appropriate for use in a reactive environment. Hibernate Reactive is a feature-rich ORM implementation designed to take advantage of non-blocking database clients.

Hibernate Reactive works with the Vert.x reactive database clients for:

Interoperable with Hibernate ORM

If you already know Hibernate ORM, most of what you know applies just as well to Hibernate Reactive. And if you have existing entities and O/R mappings, they’ll mostly just work without any changes.

It’s completely possible to use Hibernate Reactive and Hibernate ORM side-by-side in the same program, sharing the same entities.

Mutiny streams or standard Java CompletionStage

Hibernate Reactive offers two separate APIs, one based CompletionStage from java.util.concurrent, and one on Uni from Mutiny.

If you already have experience programming reactive streams, it’s easy to get started. If you don’t, well, we’d better warn that reactive does take some getting used to.

JDBC-free

Hibernate Reactive doesn’t use JDBC, and the Vert.x clients don’t depend on any JDBC driver.

Fully integrated with Quarkus

Hibernate Reactive is a critical link in the reactive programming model of Quarkus. The Quarkus site has information about Using Hibernate Reactive.

Back to top