Add optional module for Jakarta Transactions impl of Jakarta EE 9 Spec#35810
Merged
Conversation
11d1fc3 to
7ec4950
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an optional Jakarta Transactions implementation for Jakarta EE 9 to support XA in ShardingSphere, updates native test dependencies, and unifies JDBC driver version management.
- Add new
shardingsphere-transaction-xa-jakartamodules (SPI, provider, core) alongside existing XA core. - Update
pom.xmlandtest/native/pom.xmlto bump MS SQL, Oracle JDBC versions and declare Jakarta BOM properties. - Extend tests for Atomikos/Narayana providers and core JTA integration under Jakarta spec.
Reviewed Changes
Copilot reviewed 86 out of 86 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/native/pom.xml | Added Jakarta EE 9 BOM properties and switched XA core exclusions. |
| pom.xml | Bumped <mssql.version>, added <ojdbc8.version> and test dependency. |
| kernel/transaction/type/xa-jakarta | Introduced Jakarta EE 9–based XA modules (spi, provider, core). |
| kernel/transaction/type/xa-jakarta/core/src/main/java/.../DataSourceSwapper.java | Implemented data source→XADataSource property mapping. |
| kernel/transaction/type/xa-jakarta/spi/src/main/java/.../SingleXAResource.java | Wrapped XAResource with exception mapping stub. |
| kernel/transaction/type/xa-jakarta/provider/* | Added Atomikos and Narayana transaction manager providers/tests. |
Comments suppressed due to low confidence (1)
kernel/transaction/type/xa-jakarta/provider/atomikos/src/test/java/org/apache/shardingsphere/transaction/xa/jakarta/atomikos/manager/AtomikosTransactionManagerProviderTest.java:78
- [nitpick] The test method name
assertEnListResourcehas inconsistent camelCase; consider renaming toassertEnlistResourcefor readability.
void assertEnListResource() throws SystemException, RollbackException {
f849c5e to
749c2ed
Compare
linghengqian
commented
Jul 19, 2025
linghengqian
left a comment
Member
Author
There was a problem hiding this comment.
- Cannot use
org.eclipse.transformer:transformer-maven-plugin:0.5.0becauseorg.eclipse.transformer:transformer-maven-plugin:0.5.0's handling conflicts with thejar-in-test-phaseofmaven-jar-pluginintroduced in graalvm/native-build-tools#727 .
- This PR needs further review, as starting with GraalVM Native Build Tools 0.11.0, support for running integration tests using the
maven-failsafe-pluginis available. See https://github.com/graalvm/native-build-tools/blob/master/docs/src/docs/asciidoc/changelog.adoc .
7 tasks
fcff5b2 to
040af70
Compare
7 tasks
4abf57f to
79dafef
Compare
linghengqian
commented
Jul 22, 2025
linghengqian
left a comment
Member
Author
There was a problem hiding this comment.
- Cannot use
org.eclipse.transformer:transformer-maven-plugin:0.5.0becauseorg.eclipse.transformer:transformer-maven-plugin:0.5.0's handling conflicts with thejar-in-test-phaseofmaven-jar-pluginintroduced in graalvm/native-build-tools#727 .
- This PR needs further review, as starting with GraalVM Native Build Tools 0.11.0, support for running integration tests using the
maven-failsafe-pluginis available. See https://github.com/graalvm/native-build-tools/blob/master/docs/src/docs/asciidoc/changelog.adoc .
- All the prerequisite issues have been solved based on #36050 .
bfed3a9 to
112f971
Compare
linghengqian
commented
Jul 30, 2025
linghengqian
left a comment
Member
Author
There was a problem hiding this comment.
- Previous CI failures seem to be related to https://www.githubstatus.com/incidents/s6d4x8c6cvv5 .
terrymanu
approved these changes
Aug 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #26041 .
Changes proposed in this pull request:
shardingsphere-transaction-xa-jakartabasically reuses all the definitions ofshardingsphere-transaction-xa, but switchesjavax.transactionjava package tojakarta.transactionjava package, and uses a different set of third-party dependencies.org.apache.shardingsphere.transaction.api.TransactionType#XAis still used, becauseorg.apache.shardingsphere:shardingsphere-transaction-xa-jakarta-coreandorg.apache.shardingsphere:shardingsphere-transaction-xa-jakarta-corecannot be used in the same Maven module at the same time, as the two modules use different versions of the same set of third-party dependencies. Of course I know that there are new major impacts in General upgrade to Jakarta EE 11 APIs spring-projects/spring-framework#34011 on the Spring Boot 4 milestone. But we should always take it one step at a time, right?com.microsoft.sqlserver:mssql-jdbc:12.10.1.jre8. For Improve GraalVM Reachability Metadata and corresponding nativeTest related unit tests #29052 .12.10.1.jre8. I can't understand whycom.microsoft.sqlserver:mssql-jdbc:6.1.7.jre8-previewwould depend on Jakarta EE 8's JAXB API.🫠Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.