-
Notifications
You must be signed in to change notification settings - Fork 109
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
Initial draft of Jakarta Persistence/CDI EE integration tests #1623
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Scott M Stark <[email protected]>
Signed-off-by: Scott M Stark <[email protected]>
Glassfish issue for handling Jakarta Persistence 3.2 changes: eclipse-ee4j/glassfish#25198 |
Signed-off-by: Scott M Stark <[email protected]>
@@ -332,6 +332,17 @@ | |||
<artifactId>derbytools</artifactId> | |||
<version>10.15.2.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.glassfish.main.deployment</groupId> |
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.
Is this just temp to help with debugging?
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.
Yes, leftover from looking at adding a glassfish annotation handler to the test deployment.
Signed-off-by: Scott M Stark <[email protected]>
@starksm64 some things I don't understand yet about this commit. <persistence-unit name="CTS-EM" transaction-type="JTA">
<description>Persistence Unit for CTS Vehicle Tests</description>
<qualifier>ee.jakarta.tck.persistence.ee.cdi.CtsEmQualifier</qualifier>
<jta-data-source>jdbc/DB1</jta-data-source>
<class>ee.jakarta.tck.persistence.ee.entityManager.Order</class>
</persistence-unit>
<persistence-unit name="CTS-EM2" transaction-type="JTA">
<description>Persistence Unit for CTS Vehicle Tests</description>
<qualifier>ee.jakarta.tck.persistence.ee.cdi.CtsEmQualifier</qualifier>
<jta-data-source>jdbc/DB1</jta-data-source>
<class>ee.jakarta.tck.persistence.ee.entityManager.Order</class>
</persistence-unit> Both persistence units have the same qualifier. That doesn't seem to be allowed, as it will lead to ambigious candidates for injection. Additionally, the spec uses |
Fix qualifier for CTS-EM2
If Glassfish handled the persistence and CDI integration when switching to another persistence provider that provides the CDI integration, it will cause a conflict? |
Basically, if that persistence provider included a CDI extension in its main jar / maven dependency. Although I don't think Hibernate will do this. I think it's architecturally wrong for GlassFish to provide this. We also don't let GlassFish handle all the CDI concerns for Mojarra, Cocurro, or Soteria, just to name three. But for EE 11 the ship has sailed, and we have to do it like this. |
^ appears to be resolved now as the qualifier for CTS-EM2 was updated. |
Indeed, I updated it myself. Unfortunately I never heard back from @starksm64 about this. |
This is a work in progress. The glassfish version in use does not seem to have a Jakarta Persistence integration that supports the custom qualifiers for injecting an EntityManager.
Fixes Issue
#1405
Related Issue(s)
Specify any related issue(s) links.
Describe the change
A clear and concise description of the change.
Additional context
Add any other context about the problem here.
CC @alwin-joseph @anajosep @arjantijms @cesarhernandezgt @dblevins @m0mus @edbratt @gurunrao @jansupol @jgallimore @kazumura @kwsutter @LanceAndersen @bhatpmk @RohitKumarJain @shighbar @gthoman @brideck @OndroMih @dmatej
@starksm64 @scottmarlow