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

Fix XA support for Oracle in native #40704

Merged
merged 2 commits into from
May 22, 2024
Merged

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented May 17, 2024

We need to register a few more classes for reflection and also all their
nested classes, which is why I use @RegisterForReflection instead of
the usual build item.

Fixes #23341

@gsmet gsmet requested a review from yrodiere May 17, 2024 15:43
@quarkus-bot quarkus-bot bot added area/docstyle issues related for manual docstyle review area/documentation area/hibernate-orm Hibernate ORM area/persistence labels May 17, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented May 17, 2024

/cc @yrodiere (hibernate-orm)

@quarkus-bot quarkus-bot bot added this to To do in Quarkus Documentation May 17, 2024
@gsmet
Copy link
Member Author

gsmet commented May 17, 2024

@zakkak I wonder if we should also register nested classes by default with the build item (and provide a way to disable it) as it's a bit weird the build item and the annotation are not consistent.

Especially since, in some cases, it's very inconvenient to register all the nested classes manually.

@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

Copy link

github-actions bot commented May 17, 2024

🙈 The PR is closed and the preview is expired.

@zakkak
Copy link
Contributor

zakkak commented May 17, 2024

@zakkak I wonder if we should also register nested classes by default with the build item (and provide a way to disable it) as it's a bit weird the build item and the annotation are not consistent.

Especially since, in some cases, it's very inconvenient to register all the nested classes manually.

As someone who doesn't have to deal with this often enough I think I am not the right person to make that call. I am certainly OK with such a change if it makes things easier for Quarkus contributors and users.

@@ -3,6 +3,7 @@ quarkus.datasource.username=SYSTEM
quarkus.datasource.password=hibernate_orm_test
quarkus.datasource.jdbc.url=${oracledb.url}
quarkus.datasource.jdbc.max-size=1
quarkus.datasource.jdbc.transactions=xa
Copy link
Member

Choose a reason for hiding this comment

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

This is nice, but... it means we're no longer testing the non-XA case with Oracle.

Should we duplicate all such test modules? :/

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought the second datasource would be fine? But maybe it doesn't connect actually.

I can drop this part or add have 2 datasources that point to the same database but one xa and one non-xa?

Copy link
Member Author

Choose a reason for hiding this comment

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

Given we will push more people towards XA, I think it's probably better to have separate tests for XA for each driver we support. It has a cost but I don't feel comfortable not paying it given the new situation with Agroal/Narayana.

WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

My concerns are mostly about native images, where the simple fact of using of XA could have a dramatic impact on what GraalVM generates.

I agree duplicating tests would be the way forward.

This will mean even more copy-pasting in tests that already contain a lot of that, but until we find a way to run the same integration test multiple times with different configuration and Maven dependencies... that will have to do.

Copy link
Member Author

Choose a reason for hiding this comment

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

I dropped the test change for now.
Will see if it makes sense to have so many new native modules later.

Quarkus Documentation automation moved this from To do to Reviewer approved May 17, 2024
gsmet added 2 commits May 21, 2024 18:43
We need to register a few more classes for reflection and also all their
nested classes, which is why I use `@RegisterForReflection` instead of
the usual build item.

Fixes quarkusio#23341
@quarkus-bot
Copy link

quarkus-bot bot commented May 21, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 13d163c.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

⚠️ There are other workflow runs running, you probably need to wait for their status before merging.

@quarkus-bot
Copy link

quarkus-bot bot commented May 21, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 13d163c.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@yrodiere yrodiere merged commit daef5d3 into quarkusio:main May 22, 2024
24 checks passed
Quarkus Documentation automation moved this from Reviewer approved to Done May 22, 2024
@quarkus-bot quarkus-bot bot added this to the 3.12 - main milestone May 22, 2024
@gsmet gsmet modified the milestones: 3.12 - main, 3.8.5 May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Oracle JDBC extension in native mode doesn´t work with XA
3 participants