-
Notifications
You must be signed in to change notification settings - Fork 246
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
HSEARCH-4940 Use "Jakarta Batch" instead of "JSR-352"/"Batch for Java" in POM and documentation of JSR-352 artifacts #3738
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated that service file and bean names too, but with these changes EntityManagerFactoryRegistry emfRegistryin JobContextSetupListener is injected as JBeretEntityManagerFactoryRegistry (previously it was just null), which leads to failures since the PersistenceUnitAccessor#entityManagerFactory == null
I don't get what you mean... Maybe we should discuss this on Zulip?
besides the bug, do we want to change the java module names + packages for these modules or should we leave them as they are?
I'd change the java module names + packages. It's a breaking change (which needs to be documented), but I've checked and these modules are not productized yet, so we can break this in a major like 7.0.
documentation/src/main/asciidoc/public/reference/_mapper-orm-indexing-jakarta-batch.adoc
Outdated
Show resolved
Hide resolved
...main/java/org/hibernate/search/batch/jakarta/core/massindexing/util/impl/JobContextUtil.java
Outdated
Show resolved
Hide resolved
fdd7f3e
to
779754c
Compare
I've left the "incorrect" service file name as well. With JBeret upgrade the listener was added through CDI even though the reference was incorrect. They've added some code that would check if the bean is present by a reference in the bean manager and if not try to use the reference as a class name and lookup beans by that class. So we were ending up getting the listener through the CDI and as a result, working with the JBeret registry which led to test failures in the end. Added all the notes to https://hibernate.atlassian.net/browse/HSEARCH-4966 |
Seems you need to update dependencies in the
|
779754c
to
e6a2161
Compare
Kudos, SonarCloud Quality Gate passed! |
https://hibernate.atlassian.net/browse/HSEARCH-4940
Hey Yoann,
From what it looks, we've missed the javax->jakarata update for a CDI (see
[HSEARCH-4940 Make sure that batch beans are correctly registered within CDI]
) 😔I've updated that service file and bean names too, but with these changes
EntityManagerFactoryRegistry emfRegistry
inJobContextSetupListener
is injected asJBeretEntityManagerFactoryRegistry
(previously it was justnull
), which leads to failures since thePersistenceUnitAccessor#entityManagerFactory == null
The "fix" in
HSEARCH-4940 Fallback to ActiveSessionFactoryRegistry
makes the tests pass, but I'd still expect that the correct way to solve this would be to makePersistenceUnitAccessor#entityManagerFactory != null
... Not sure how to get there though 😔😃 ...besides the bug, do we want to change the java module names + packages for these modules or should we leave them as they are?
Opening as a draft since need a better fix for the bug ^