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.
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.
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
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.
To get in touch, use the following channels: