diff --git a/bom/application/pom.xml b/bom/application/pom.xml index c8fc1898dbae9..dc58d16485484 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -1558,6 +1558,11 @@ quarkus-resteasy-server-common-deployment ${project.version} + + io.quarkus + quarkus-transaction-annotations + ${project.version} + io.quarkus quarkus-narayana-jta diff --git a/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedError.java b/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedError.java index 15bdf44db911a..fcc63ea552cc3 100644 --- a/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedError.java +++ b/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedError.java @@ -1,6 +1,6 @@ package io.quarkus.narayana.interceptor; -import io.quarkus.narayana.jta.Rollback; +import io.quarkus.transaction.annotations.Rollback; // prevent a rollback to counter the default @Rollback(false) diff --git a/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedTestException.java b/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedTestException.java index 0bb9303b3484f..2de1d431f0de7 100644 --- a/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedTestException.java +++ b/extensions/narayana-jta/deployment/src/test/java/io/quarkus/narayana/interceptor/AnnotatedTestException.java @@ -1,6 +1,6 @@ package io.quarkus.narayana.interceptor; -import io.quarkus.narayana.jta.Rollback; +import io.quarkus.transaction.annotations.Rollback; // force a rollback to counter the default @Rollback diff --git a/extensions/narayana-jta/runtime/pom.xml b/extensions/narayana-jta/runtime/pom.xml index a91d4fae55f6d..f6a1a6fd3a599 100644 --- a/extensions/narayana-jta/runtime/pom.xml +++ b/extensions/narayana-jta/runtime/pom.xml @@ -21,6 +21,10 @@ io.quarkus quarkus-arc + + io.quarkus + quarkus-transaction-annotations + io.quarkus quarkus-mutiny diff --git a/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java b/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java index 2c6a0ead10ee3..847648280e981 100644 --- a/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java +++ b/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/interceptor/TransactionalInterceptorBase.java @@ -27,9 +27,9 @@ import com.arjuna.ats.jta.logging.jtaLogger; import io.quarkus.arc.runtime.InterceptorBindings; -import io.quarkus.narayana.jta.Rollback; import io.quarkus.narayana.jta.runtime.CDIDelegatingTransactionManager; import io.quarkus.narayana.jta.runtime.TransactionConfiguration; +import io.quarkus.transaction.annotations.Rollback; import io.smallrye.mutiny.Multi; import io.smallrye.reactive.converters.ReactiveTypeConverter; import io.smallrye.reactive.converters.Registry; diff --git a/extensions/pom.xml b/extensions/pom.xml index e080ce3a235bb..9cfbcf20d2c52 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -78,6 +78,7 @@ redis-client + transaction-annotations narayana-jta narayana-stm narayana-lra diff --git a/extensions/transaction-annotations/pom.xml b/extensions/transaction-annotations/pom.xml new file mode 100644 index 0000000000000..3c7e56d7ac066 --- /dev/null +++ b/extensions/transaction-annotations/pom.xml @@ -0,0 +1,19 @@ + + + + quarkus-extensions-parent + io.quarkus + 999-SNAPSHOT + ../pom.xml + + 4.0.0 + + quarkus-transaction-annotations-parent + Quarkus - Transaction Annotations + pom + + runtime + + diff --git a/extensions/transaction-annotations/runtime/pom.xml b/extensions/transaction-annotations/runtime/pom.xml new file mode 100644 index 0000000000000..f94940f056386 --- /dev/null +++ b/extensions/transaction-annotations/runtime/pom.xml @@ -0,0 +1,21 @@ + + + + quarkus-transaction-annotations-parent + io.quarkus + 999-SNAPSHOT + ../ + + 4.0.0 + + quarkus-transaction-annotations + Quarkus - Transaction Annotations - Runtime + Transaction Annotations - Runtime + + + + + + diff --git a/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/Rollback.java b/extensions/transaction-annotations/runtime/src/main/java/io/quarkus/transaction/annotations/Rollback.java similarity index 88% rename from extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/Rollback.java rename to extensions/transaction-annotations/runtime/src/main/java/io/quarkus/transaction/annotations/Rollback.java index f506689eea16a..983ff1b09b6af 100644 --- a/extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/Rollback.java +++ b/extensions/transaction-annotations/runtime/src/main/java/io/quarkus/transaction/annotations/Rollback.java @@ -1,4 +1,4 @@ -package io.quarkus.narayana.jta; +package io.quarkus.transaction.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -10,8 +10,6 @@ /** * If you annotate your exception with this annotation, the transactional interceptor will * use the exception's instructions to force a rollback or not. - * - * FIXME: move to SPI so it can be used by TransactionalReactive */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)