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

Introduce ConnectionFactoryWrapperBuildItem #29753

Merged
merged 2 commits into from
Feb 7, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>3.1.0</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 jakarta.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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, you aware that you will be able to produce only one of these?

Not sure exactly for what it is used but that probably means you won't be able to mix several JMS extensions (not sure if it makes sense).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, only quarkus-pooled-jms will produce this BuildItem to provide pooling and JTA integration capabilities currently . Other JMS extensions can consume it.

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 @@ -200,6 +200,9 @@

<module>awt</module>

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

</modules>

<build>
Expand Down