-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
The FastBootEntityManagerFactoryBuilder doesn't allow us to decorate the SessionFactory #33564
Comments
Hi @vladmihalcea , we don't necessarily support all SPI and integrations; we can consider this but I'm classifying it as a feature request. Could you elaborate on why you need to decorate it? |
@Sanne Thanks for the explanation. This is needed by the Quarkus clients who are also using Hypersistence Optimizer to detect performance issues automatically. This problem has been reported by one of the users in this issue. |
Ic, thanks. But could you explain which aspect of the We can't expose the SessionFactoryBuilder as-is as it allows several options which Quarkus sets/controls automatically, and really are a bit specific to runtime integrations so not really interesting to end users, but we can look into exposing particular observability hooks. For example, if you need |
Hypersistence Optimizer uses the For this, it relies on the |
Hello @Sanne @vladmihalcea |
@adampoplawski It's unfortunate that Quarkus took the decision to not honor that SPI contract. Hypersistence Optimizer can decorate Spring Boot just fine, and starting with version 2.8, it will support Micronout as well. Therefore, until this issue is fixed, if you want to benefit from all the advantages offered by Hypersistence Optimizer, you can use Spring Boot or Micronout instead for your services. |
@Sanne Any update on that request ? |
@Sanne Is this still considered? Maybe an option would be to allow this only to the dev/test profile? |
Describe the bug
Hibernate Core provides the
EntityManagerFactoryBuilderImpl
so that when building anEntityManagerFactory
, theSessionFactoryBuilder
SPI is used, like this:Quarkus does not do that. Instead, it creates a hardcoded
SessionFactoryImpl
in theFastBootEntityManagerFactoryBuilder
, like this:Expected behavior
The
FastBootEntityManagerFactoryBuilder
should use theSessionFactoryBuilder
so that applications can decorate the HibernateSessionFactory
via this SPI mechanism.Actual behavior
The
SessionFactoryImpl
is instantiated no matter if we declare aorg.hibernate.boot.spi.SessionFactoryBuilderFactory
SPI.How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: