From cda8d9ed80eca8ec779d3e97ef263e42ab2a2f92 Mon Sep 17 00:00:00 2001 From: Zheng Feng Date: Thu, 8 Dec 2022 17:49:33 +0800 Subject: [PATCH 1/2] Introduce jms-spi with ConnectionFactoryWrapperBuildItem --- build-parent/pom.xml | 8 ++++++ extensions/jms-spi/deployment/pom.xml | 27 +++++++++++++++++++ .../ConnectionFactoryWrapperBuildItem.java | 25 +++++++++++++++++ extensions/jms-spi/pom.xml | 20 ++++++++++++++ extensions/pom.xml | 3 +++ 5 files changed, 83 insertions(+) create mode 100644 extensions/jms-spi/deployment/pom.xml create mode 100644 extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java create mode 100644 extensions/jms-spi/pom.xml diff --git a/build-parent/pom.xml b/build-parent/pom.xml index d1d12aba0a97e..ca2882a1c6734 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -175,6 +175,9 @@ 1.1.1 7.4.4 + + + 2.0.3 @@ -348,6 +351,11 @@ mermaid ${webjar.mermaid.version} + + jakarta.jms + jakarta.jms-api + ${jakarta.jms-api.version} + com.github.davidmoten subethasmtp diff --git a/extensions/jms-spi/deployment/pom.xml b/extensions/jms-spi/deployment/pom.xml new file mode 100644 index 0000000000000..98a1c8c187193 --- /dev/null +++ b/extensions/jms-spi/deployment/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + + io.quarkus + quarkus-jms-spi-parent + 999-SNAPSHOT + + + quarkus-jms-spi-deployment + Quarkus - JMS - SPI - Deployment + + + + io.quarkus + quarkus-core-deployment + + + jakarta.jms + jakarta.jms-api + + + + diff --git a/extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java b/extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java new file mode 100644 index 0000000000000..bc7ccc951f6c4 --- /dev/null +++ b/extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java @@ -0,0 +1,25 @@ +package io.quarkus.jms.spi.deployment; + +import java.util.function.Function; + +import javax.jms.ConnectionFactory; + +import io.quarkus.builder.item.SimpleBuildItem; + +/** + * A build item that can be used to wrap the JMS ConnectionFactory + */ +public final class ConnectionFactoryWrapperBuildItem extends SimpleBuildItem { + private final Function wrapper; + + public ConnectionFactoryWrapperBuildItem(Function wrapper) { + if (wrapper == null) { + throw new AssertionError("wrapper is required"); + } + this.wrapper = wrapper; + } + + public Function getWrapper() { + return wrapper; + } +} diff --git a/extensions/jms-spi/pom.xml b/extensions/jms-spi/pom.xml new file mode 100644 index 0000000000000..ed967c17f6814 --- /dev/null +++ b/extensions/jms-spi/pom.xml @@ -0,0 +1,20 @@ + + + + quarkus-extensions-parent + io.quarkus + 999-SNAPSHOT + ../pom.xml + + 4.0.0 + + quarkus-jms-spi-parent + Quarkus - JMS SPI - Parent + pom + + deployment + + + diff --git a/extensions/pom.xml b/extensions/pom.xml index 39f767d438f5c..e443cd5dffe96 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -200,6 +200,9 @@ awt + + jms-spi + From 70497481803bba7cb40609fb3fa327cb65d1e578 Mon Sep 17 00:00:00 2001 From: Zheng Feng Date: Mon, 6 Feb 2023 20:23:07 +0800 Subject: [PATCH 2/2] Update jakarta jms-api --- build-parent/pom.xml | 2 +- .../jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-parent/pom.xml b/build-parent/pom.xml index ca2882a1c6734..304e3dd07d0de 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -177,7 +177,7 @@ 7.4.4 - 2.0.3 + 3.1.0 diff --git a/extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java b/extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java index bc7ccc951f6c4..2266bec3ebc6e 100644 --- a/extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java +++ b/extensions/jms-spi/deployment/src/main/java/io/quarkus/jms/spi/deployment/ConnectionFactoryWrapperBuildItem.java @@ -2,7 +2,7 @@ import java.util.function.Function; -import javax.jms.ConnectionFactory; +import jakarta.jms.ConnectionFactory; import io.quarkus.builder.item.SimpleBuildItem;