Skip to content

Commit

Permalink
Merge pull request #177 from graben/messaginghub
Browse files Browse the repository at this point in the history
Make pooled-jms dependency optional
  • Loading branch information
geoand authored Dec 23, 2024
2 parents 9f4cb28 + eb25009 commit c80b228
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions narayana-spring-boot-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<dependency>
<groupId>org.messaginghub</groupId>
<artifactId>pooled-jms</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
5 changes: 5 additions & 0 deletions narayana-spring-boot-starter-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
<artifactId>agroal-spring-boot-starter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.messaginghub</groupId>
<artifactId>pooled-jms</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jakarta-server</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions narayana-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<artifactId>jakarta.jms-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.messaginghub</groupId>
<artifactId>pooled-jms</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
import dev.snowdrop.boot.narayana.core.jms.PooledXAConnectionFactoryWrapper;
import dev.snowdrop.boot.narayana.core.properties.NarayanaProperties;
import dev.snowdrop.boot.narayana.core.properties.NarayanaPropertiesInitializer;
import org.apache.commons.pool2.PooledObject;
import org.jboss.tm.XAResourceRecoveryRegistry;
import org.messaginghub.pooled.jms.JmsPoolConnectionFactory;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
Expand Down Expand Up @@ -185,7 +187,7 @@ public XAConnectionFactoryWrapper xaConnectionFactoryWrapper(TransactionManager
}

@ConditionalOnProperty(name = "narayana.messaginghub.enabled", havingValue = "true")
@ConditionalOnClass(Message.class)
@ConditionalOnClass({Message.class, JmsPoolConnectionFactory.class, PooledObject.class })
static class PooledJmsConfiguration {

@Bean
Expand Down

0 comments on commit c80b228

Please sign in to comment.