-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple persistence units for Hibernate Reactive #21110
Comments
/cc @DavideD, @Sanne, @gavinking |
Any news? |
cc @gsmet |
Hi. Why isn't multiple persistence units supported for Hibernate Reactive? I see that resteasy-reactive has become the default rest layer. So I'd like to write whole app in reactive style. But the Hibernate Reactive is not with all the features I need. |
There's no instrinsic limitation, as you noticed Hibernate Reactive upstream can deal with multiple persistence units and we do plan to eventually support this in Quarkus as well. But currently the Hibernate Reactive extension for Quarkus is in a problematic shape: it's highly coupled to the core of the Hibernate ORM blocking extension, and the presence of it actually taints the state of the blocking ORM instances. It needs to be rewritten with a more flexible design. But we're aiming to support Hibernate ORM 6 first, and in terms of project steering it's not a good idea to have these big initiatives working in parallel; since we know Hibernate Reactive also needs substantial changes to make itself ready for ORM6, I feel that re-implementing the Hibernate Reactive extension for Quarkus is better deferred to when such other tasks have been done. This is the order in which I expect us to make progress:
Since there's already big changes being made in parallel across all projects, it would be problematic to start the refactoring of the Hibernate Reactive extension in parallel as well. Not least because it's the same people working on these points, so it's not like we'd finish faster :)
The I might be wrong, I'm actually interested why you're asking for it? How important is that for you? |
Hi @Sanne seems there has been somework on this. Is this now being planned for being supported in Quarkus. We now do Reactive APP + Jdbc Database conneciton via agroal. |
Actually, since we hit this limitation in our case as well, we need to take an architectural decision on our side and use the plain hibernate ORM, but the rest of our service is written in RESTEasy Reactive. Question: does Resteasy Reactive play nicely with the plain Hibernate (non-reactive) client without having any issues later down the road for the microservices that mix those two? |
Yes, RESTEasy Reactive works perfectly with both flavors of Hibernate |
Hey @Sanne, could you please update if multiple persistence units supported by latest quarkus version? |
Main branch docs says it is not https://quarkus.io/version/main/guides/hibernate-reactive#hr-limitations. |
Is there any update on this ticket or any ideas when this will be fixed? |
Describe the bug
In my test application.yaml I have configuration like below:
When I'am running tests I see warning message in console:
WARN: Skipping registration of ReactiveSessionFactoryProducer and ReactiveSessionProducer because exactly one persistence unit is required for their registration
And after that test failed with:
java.lang.NullPointerException: Cannot invoke "org.hibernate.reactive.mutiny.Mutiny$Session.createQuery(String)" because "em" is null
Expected behavior
Two persistent reactive units should be initialized properly.
Actual behavior
Non of reactive persistent units was initialized.
How to Reproduce?
No response
Output of
uname -a
orver
Linux 5.13.0-20-generic #20-Ubuntu SMP Fri Oct 15 14:21:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
16.0.2
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.4.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.6.2
Additional information
No response
The text was updated successfully, but these errors were encountered: