This version contains upgrades to Vert.x SQL client 4.1.1 and Hibernate ORM 5.5.3.Final. We’ve also added some sanity checks to help prevent issues caused by using the session in the wrong thread.
You can find a complete list of changes on the Hibernate Reactive issue tracker.
How can I get it?
All details are available on the Hibernate Reactive website releases page.
If you are new to Hibernate Reactive, the official documentation is a good place to start.
Sessions, threads and sanity checks
The Hibernate Reactive session is NOT thread-safe.
Using the session in different threads may cause issues that are hard to debug. Also, a newly created session is bound to a Vert.x context and needs to be used in the same context after that.
This is normally taken care of by Hibernate Reactive when using
The new sanity checks should help prevent these type of problems. In particular, you might see two types of error after the upgrade:
HR000068: This method should exclusively be invoked from a Vert.x EventLoop thread; …: this means the code is not running in the event loop thread. Depending on your code, a way to fix this is to use
Context#runOnContextas explained in the Vert.x documentation
HR000069: Detected use of the reactive Session from a different Thread than the one which was used to open the reactive Session …: in this case the session is shared by two different threads and you need to change your code so that it doesn’t happen.
We don’t recommend it but it’s also possible to disable the sanity checks setting the system property
The VertxInstance service
Hibernate Reactive will create a new Vert.x instance if one is not available. If your application already have one, you can tell Hibernate Reactive to use it via the
You can register your implementation using the ServiceLoader mechanism of the JDK:
Add a text file named
The text file will contain the path to the class implementing the
VertxInstanceinterface. For example:
Now Hibernate Reactive will call an instance of
MyVertxProvider every time it needs a Vert.x instance.
Feedback, issues, ideas?
To get in touch, use the following channels:
hibernate-reactive tag on Stackoverflow (usage questions)
User forum or the hibernate-user stream on Zulip (usage questions, general feedback)
Issue tracker (bug reports, feature requests)
Mailing list or the hibernate-reactive-dev stream on Zulip (development-related discussions)