From db74868ee496565c0a3871d858dfadff9bb125f4 Mon Sep 17 00:00:00 2001 From: jbonofre Date: Tue, 25 May 2021 07:45:54 +0200 Subject: [PATCH] [AMQ-8026] Upgrade to Spring 5.3.7 --- activemq-karaf/src/main/resources/features-core.xml | 2 +- activemq-osgi/pom.xml | 1 + .../test/java/org/apache/activemq/spring/ListenerTest.java | 6 ++++-- .../apache/activemq/spring/ParallelXATransactionTest.java | 6 ++++-- pom.xml | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/activemq-karaf/src/main/resources/features-core.xml b/activemq-karaf/src/main/resources/features-core.xml index 31187aa51f..a3e0829b0a 100644 --- a/activemq-karaf/src/main/resources/features-core.xml +++ b/activemq-karaf/src/main/resources/features-core.xml @@ -22,7 +22,7 @@ - spring + spring aries-blueprint mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1 mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 diff --git a/activemq-osgi/pom.xml b/activemq-osgi/pom.xml index b34ea17694..573ba4ae13 100644 --- a/activemq-osgi/pom.xml +++ b/activemq-osgi/pom.xml @@ -155,6 +155,7 @@ sun.misc*;resolution:=optional, sun.nio*;resolution:=optional, sun.rmi*;resolution:=optional, + javax.xml.bind*;version="[2,3)", javax.jmdns*;resolution:=optional, javax.resource*;resolution:=optional, javax.servlet*;resolution:=optional, diff --git a/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java b/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java index e5c08317d8..7aac60470d 100644 --- a/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java +++ b/activemq-spring/src/test/java/org/apache/activemq/spring/ListenerTest.java @@ -22,10 +22,11 @@ import org.slf4j.LoggerFactory; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; +import org.springframework.test.annotation.Commit; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.transaction.TransactionConfiguration; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import javax.jms.*; @@ -33,7 +34,8 @@ import javax.jms.*; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:spring/spring.xml"}) -@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false) +@Transactional +@Commit public class ListenerTest { private static final Logger LOG = LoggerFactory.getLogger(ListenerTest.class); diff --git a/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java b/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java index 867e87e3be..a9ddc43356 100644 --- a/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java +++ b/activemq-spring/src/test/java/org/apache/activemq/spring/ParallelXATransactionTest.java @@ -24,13 +24,14 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; +import org.springframework.test.annotation.Commit; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.transaction.TransactionConfiguration; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionException; import org.springframework.transaction.TransactionStatus; +import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionCallbackWithoutResult; import org.springframework.transaction.support.TransactionTemplate; @@ -43,7 +44,8 @@ import java.util.Arrays; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:spring/xa.xml"}) -@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false) +@Transactional +@Commit public class ParallelXATransactionTest { private static final Logger LOG = LoggerFactory.getLogger(ParallelXATransactionTest.class); diff --git a/pom.xml b/pom.xml index 705576ef38..080a8d1584 100644 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,7 @@ 1.7.1 1.7.30 1.1.2 - 4.3.30.RELEASE + 5.3.7 1.2.5 2.3 2.7.2