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

4.x: Upgrades Narayana to version 7.0.0.Final #7662

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 7 additions & 18 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
<version.lib.jaxb-impl>4.0.3</version.lib.jaxb-impl>
<version.lib.jboss.classfilewriter>1.2.5.Final</version.lib.jboss.classfilewriter>
<version.lib.jboss.logging>3.5.3.Final</version.lib.jboss.logging>
<version.lib.jboss.transaction-spi>7.6.1.Final</version.lib.jboss.transaction-spi>
<!-- Force upgrade version used by maven-jaxb2-plugin. Needed to support Java 16 -->
<version.lib.jaxb-runtime>4.0.3</version.lib.jaxb-runtime>
<version.lib.jersey>3.1.3</version.lib.jersey>
Expand Down Expand Up @@ -125,7 +124,7 @@
<version.lib.mongodb>4.10.2</version.lib.mongodb>
<version.lib.mssql-jdbc>8.4.1.jre8</version.lib.mssql-jdbc>
<version.lib.mysql-connector-java>8.0.28</version.lib.mysql-connector-java>
<version.lib.narayana>5.13.1.Final</version.lib.narayana>
<version.lib.narayana>7.0.0.Final</version.lib.narayana>
<version.lib.neo4j>5.12.0</version.lib.neo4j>
<version.lib.netty>4.1.94.Final</version.lib.netty>
<version.lib.netty-io_uring>0.0.8.Final</version.lib.netty-io_uring>
Expand Down Expand Up @@ -331,6 +330,11 @@
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>${version.lib.jakarta.cdi-api}</version>
</dependency>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.lang-model</artifactId>
<version>${version.lib.jakarta.cdi-api}</version>
</dependency>
<dependency>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
Expand Down Expand Up @@ -845,23 +849,13 @@
</dependency>
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta-jakarta</artifactId>
<artifactId>narayana-jta</artifactId>
<version>${version.lib.narayana}</version>
</dependency>
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>cdi</artifactId>
<version>${version.lib.narayana}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.resource</groupId>
<artifactId>jboss-connector-api_1.7_spec</artifactId>
</exclusion>
<exclusion>
<groupId>sun.jdk</groupId>
<artifactId>jconsole</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
Expand Down Expand Up @@ -904,11 +898,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-transaction-spi-jakarta</artifactId>
<version>${version.lib.jboss.transaction-spi}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.environment</groupId>
<artifactId>weld-environment-common</artifactId>
Expand Down
7 changes: 1 addition & 6 deletions integrations/cdi/jta-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@
<artifactId>jandex</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-transaction-spi-jakarta</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Provided-scoped dependencies. -->
<dependency>
Expand All @@ -84,7 +79,7 @@
<!-- Compile-scoped dependencies. -->
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta-jakarta</artifactId>
<artifactId>narayana-jta</artifactId>
</dependency>

<!-- Feature generation -->
Expand Down
9 changes: 5 additions & 4 deletions integrations/cdi/jta-cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,22 @@
* version 2.0 using <a href="http://narayana.io/">Narayana</a> as the
* underlying implementation.
*/
@Aot(description = "Experimental support, tested on limited use cases")
@Feature(value = "JTA",
description = "Jakarta transaction API support for Helidon MP",
in = HelidonFlavor.MP,
path = "JTA"
)
@Aot(description = "Experimental support, tested on limited use cases")
@SuppressWarnings({ "requires-automatic", "requires-transitive-automatic" })
module io.helidon.integrations.jta.cdi {

requires jakarta.annotation;
requires jakarta.cdi;
requires transitive jakarta.cdi;
requires jakarta.inject;
requires jakarta.transaction;
requires transitive jakarta.transaction;
requires java.rmi;
requires java.sql;
requires narayana.jta.jakarta;
requires narayana.jta;

requires static io.helidon.common.features.api;

Expand Down
2 changes: 1 addition & 1 deletion integrations/cdi/jta-weld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<!-- Compile-scoped dependencies. -->
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta-jakarta</artifactId>
<artifactId>narayana-jta</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
Expand Down
2 changes: 1 addition & 1 deletion integrations/cdi/jta-weld/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
requires jakarta.transaction;
requires java.logging;
requires java.rmi;
requires narayana.jta.jakarta;
requires narayana.jta;

requires transitive weld.spi;

Expand Down
2 changes: 1 addition & 1 deletion integrations/jta/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta-jakarta</artifactId>
<artifactId>narayana-jta</artifactId>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,11 @@ boolean enlisted() throws SQLException {
Enlistment enlistment = this.enlistment; // volatile read
if (enlistment == null) {
return false;
} else if (enlistment.threadId() != Thread.currentThread().getId()) {
} else if (enlistment.threadId() != Thread.currentThread().threadId()) {
// We're enlisted in a Transaction on thread 1, and a caller from thread 2 is trying to do something with
// us. This could have unintended side effects. Throw.
throw new SQLTransientException("Already enlisted (" + enlistment + "); current thread id: "
+ Thread.currentThread().getId(), INVALID_TRANSACTION_STATE_NO_SUBCLASS);
+ Thread.currentThread().threadId(), INVALID_TRANSACTION_STATE_NO_SUBCLASS);
}

// We are, or were, enlisted. Let's see in what way.
Expand Down Expand Up @@ -1049,7 +1049,7 @@ private void enlist() throws SQLException {
throw new SQLTransientException("xaResourceSupplier.get() == null");
}

Enlistment enlistment = new Enlistment(Thread.currentThread().getId(), t, xar);
Enlistment enlistment = new Enlistment(Thread.currentThread().threadId(), t, xar);
if (!ENLISTMENT.compareAndSet(this, null, enlistment)) { // atomic volatile write
// Setting this.enlistment could conceivably fail if another thread already enlisted this JtaConnection.
// That would be bad.
Expand All @@ -1058,7 +1058,7 @@ private void enlist() throws SQLException {
// call above we know it is non-null.)
throw new SQLTransientException("Already enlisted (" + this.enlistment
+ "); current transaction: " + t
+ "; current thread id: " + Thread.currentThread().getId(),
+ "; current thread id: " + Thread.currentThread().threadId(),
INVALID_TRANSACTION_STATE_NO_SUBCLASS);
}

Expand Down
5 changes: 0 additions & 5 deletions tests/integration/jpa/appl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@
<artifactId>jandex</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-transaction-spi-jakarta</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down