Skip to content

Commit 84a9a24

Browse files
committed
Introduce jms-spi with ConnectionFactoryWrapperBuildItem
1 parent f927729 commit 84a9a24

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

build-parent/pom.xml

+8
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@
172172

173173
<!-- google cloud functions invoker-->
174174
<gcf-invoker.version>1.1.1</gcf-invoker.version>
175+
176+
<!-- Jakarta JMS API used JMS SPI -->
177+
<jakarta.jms-api.version>2.0.3</jakarta.jms-api.version>
175178
</properties>
176179

177180
<dependencyManagement>
@@ -345,6 +348,11 @@
345348
<artifactId>mermaid</artifactId>
346349
<version>${webjar.mermaid.version}</version>
347350
</dependency>
351+
<dependency>
352+
<groupId>jakarta.jms</groupId>
353+
<artifactId>jakarta.jms-api</artifactId>
354+
<version>${jakarta.jms-api.version}</version>
355+
</dependency>
348356
<dependency>
349357
<groupId>com.github.davidmoten</groupId>
350358
<artifactId>subethasmtp</artifactId>

core/jms-spi/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>quarkus-build-parent</artifactId>
7+
<groupId>io.quarkus</groupId>
8+
<version>999-SNAPSHOT</version>
9+
<relativePath>../../build-parent/pom.xml</relativePath>
10+
</parent>
11+
<modelVersion>4.0.0</modelVersion>
12+
13+
<artifactId>quarkus-jms-spi</artifactId>
14+
<name>Quarkus - JMS - SPI</name>
15+
<description>SPI classes for Quarkus JMS extensions.</description>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>io.quarkus</groupId>
20+
<artifactId>quarkus-builder</artifactId>
21+
</dependency>
22+
<dependency>
23+
<groupId>jakarta.jms</groupId>
24+
<artifactId>jakarta.jms-api</artifactId>
25+
</dependency>
26+
</dependencies>
27+
28+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package io.quarkus.jms.spi;
2+
3+
import java.util.function.Function;
4+
5+
import javax.jms.ConnectionFactory;
6+
7+
import org.wildfly.common.Assert;
8+
9+
import io.quarkus.builder.item.SimpleBuildItem;
10+
11+
/**
12+
* A build item that can be used to wrap ConnectionFactory
13+
*/
14+
public final class ConnectionFactoryWrapperBuildItem extends SimpleBuildItem {
15+
private final Function<ConnectionFactory, Object> wrapper;
16+
17+
public ConnectionFactoryWrapperBuildItem(Function<ConnectionFactory, Object> wrapper) {
18+
Assert.checkNotNullParam("wrapper is required", wrapper);
19+
this.wrapper = wrapper;
20+
}
21+
22+
public Function<ConnectionFactory, Object> getWrapper() {
23+
return wrapper;
24+
}
25+
}

core/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<module>processor</module>
2020
<module>builder</module>
2121
<module>devmode-spi</module>
22+
<module>jms-spi</module>
2223
<module>launcher</module>
2324
<module>class-change-agent</module>
2425
<module>junit4-mock</module>

0 commit comments

Comments
 (0)