Skip to content

Commit

Permalink
Introduce jms-spi with ConnectionFactoryWrapperBuildItem
Browse files Browse the repository at this point in the history
  • Loading branch information
zhfeng committed Feb 2, 2023
1 parent fcb7e7b commit 28a1026
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@
<!-- google cloud functions invoker-->
<gcf-invoker.version>1.1.1</gcf-invoker.version>
<owasp-dependency-check-plugin.version>7.4.4</owasp-dependency-check-plugin.version>

<!-- Jakarta JMS API -->
<jakarta.jms-api.version>2.0.3</jakarta.jms-api.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -348,6 +351,11 @@
<artifactId>mermaid</artifactId>
<version>${webjar.mermaid.version}</version>
</dependency>
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>${jakarta.jms-api.version}</version>
</dependency>
<dependency>
<groupId>com.github.davidmoten</groupId>
<artifactId>subethasmtp</artifactId>
Expand Down
27 changes: 27 additions & 0 deletions extensions/jms-spi/deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jms-spi-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>quarkus-jms-spi-deployment</artifactId>
<name>Quarkus - JMS - SPI - Deployment</name>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core-deployment</artifactId>
</dependency>
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -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<ConnectionFactory, Object> wrapper;

public ConnectionFactoryWrapperBuildItem(Function<ConnectionFactory, Object> wrapper) {
if (wrapper == null) {
throw new AssertionError("wrapper is required");
}
this.wrapper = wrapper;
}

public Function<ConnectionFactory, Object> getWrapper() {
return wrapper;
}
}
20 changes: 20 additions & 0 deletions extensions/jms-spi/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>quarkus-extensions-parent</artifactId>
<groupId>io.quarkus</groupId>
<version>999-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>quarkus-jms-spi-parent</artifactId>
<name>Quarkus - JMS SPI - Parent</name>
<packaging>pom</packaging>
<modules>
<module>deployment</module>
</modules>

</project>
3 changes: 3 additions & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@

<module>awt</module>

<!-- JMS -->
<module>jms-spi</module>

</modules>

<build>
Expand Down

0 comments on commit 28a1026

Please sign in to comment.