Skip to content
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

fixes #6948 (@Inject Injection into EntityListener not working) #7296

Closed
wants to merge 1 commit into from
Closed

fixes #6948 (@Inject Injection into EntityListener not working) #7296

wants to merge 1 commit into from

Conversation

HonoluluHenk
Copy link

I did some digging around and the (imho) root cause for this not working is that Quarkus uses the Arc CDI implementation that is lacking some features hibernate requires.

This PR is implements a BeanManager wrapper that emulates just enough for EntityListeners to work.

Also I added some quarkus-deployment code to at least prevent the EntityListener bean from being removed due to quarkus marking it as unused.

I consider this a more-or-less ugly hack... but this feature imho cannot reasonably be implemented without lots of programming/refactoring in hibernate.

@gastaldi gastaldi added area/arc Issue related to ARC (dependency injection) area/hibernate-orm Hibernate ORM labels Feb 20, 2020
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The imports are not OK. Can you run mvn process-sources and amend your commit?

Thanks!

@mkouba
Copy link
Contributor

mkouba commented Feb 21, 2020

As I said in #6948 (comment) I'd rather try to find a different solution.

@HonoluluHenk
Copy link
Author

Closing since it's an ugly hack and not the correct solution, see #6948

@gsmet gsmet added the triage/invalid This doesn't seem right label Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/hibernate-orm Hibernate ORM triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants