Downgrade to ActiveMQ-5.12.2 for IO compatibility
**Cherry-pick to 4.2.x**
This commit is contained in:
@@ -82,7 +82,7 @@ subprojects { subproject ->
|
||||
|
||||
|
||||
ext {
|
||||
activeMqVersion = '5.13.0'
|
||||
activeMqVersion = '5.12.2'
|
||||
aspectjVersion = '1.8.7'
|
||||
apacheSshdVersion = '0.14.0'
|
||||
boonVersion = '0.33'
|
||||
|
||||
@@ -38,7 +38,7 @@ import javax.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.command.ActiveMQQueue;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
@@ -67,16 +67,16 @@ public class PollableJmsChannelTests {
|
||||
|
||||
private Destination queue;
|
||||
|
||||
@BeforeClass
|
||||
public static void setup() {
|
||||
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES", "*");
|
||||
@Before
|
||||
public void setup() {
|
||||
ActiveMqTestUtils.prepare();
|
||||
this.connectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
this.connectionFactory.setTrustAllPackages(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queueReference() throws Exception {
|
||||
ActiveMqTestUtils.prepare();
|
||||
this.connectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
this.queue = new ActiveMQQueue("pollableJmsChannelTestQueue");
|
||||
|
||||
JmsChannelFactoryBean factoryBean = new JmsChannelFactoryBean(false);
|
||||
@@ -101,10 +101,6 @@ public class PollableJmsChannelTests {
|
||||
|
||||
@Test
|
||||
public void queueName() throws Exception {
|
||||
ActiveMqTestUtils.prepare();
|
||||
this.connectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
|
||||
JmsChannelFactoryBean factoryBean = new JmsChannelFactoryBean(false);
|
||||
CachingConnectionFactory ccf = new CachingConnectionFactory(this.connectionFactory);
|
||||
ccf.setCacheConsumers(false);
|
||||
@@ -128,10 +124,6 @@ public class PollableJmsChannelTests {
|
||||
|
||||
@Test
|
||||
public void queueNameWithFalsePreReceiveInterceptors() throws Exception {
|
||||
ActiveMqTestUtils.prepare();
|
||||
this.connectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
|
||||
JmsChannelFactoryBean factoryBean = new JmsChannelFactoryBean(false);
|
||||
CachingConnectionFactory ccf = new CachingConnectionFactory(this.connectionFactory);
|
||||
ccf.setCacheConsumers(false);
|
||||
@@ -155,10 +147,6 @@ public class PollableJmsChannelTests {
|
||||
|
||||
@Test
|
||||
public void queueNameWithTruePreReceiveInterceptors() throws Exception {
|
||||
ActiveMqTestUtils.prepare();
|
||||
this.connectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
|
||||
JmsChannelFactoryBean factoryBean = new JmsChannelFactoryBean(false);
|
||||
CachingConnectionFactory ccf = new CachingConnectionFactory(this.connectionFactory);
|
||||
ccf.setCacheConsumers(false);
|
||||
@@ -182,9 +170,6 @@ public class PollableJmsChannelTests {
|
||||
|
||||
@Test
|
||||
public void qos() throws Exception {
|
||||
ActiveMqTestUtils.prepare();
|
||||
this.connectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
this.queue = new ActiveMQQueue("pollableJmsChannelTestQueue");
|
||||
CachingConnectionFactory ccf = new CachingConnectionFactory(connectionFactory);
|
||||
ccf.setCacheConsumers(false);
|
||||
@@ -241,9 +226,6 @@ public class PollableJmsChannelTests {
|
||||
|
||||
@Test
|
||||
public void selector() throws Exception {
|
||||
ActiveMqTestUtils.prepare();
|
||||
this.connectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
this.queue = new ActiveMQQueue("pollableJmsChannelSelectorTestQueue");
|
||||
|
||||
JmsChannelFactoryBean factoryBean = new JmsChannelFactoryBean(false);
|
||||
|
||||
@@ -34,7 +34,6 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.MessageListener;
|
||||
|
||||
@@ -44,7 +43,6 @@ import org.apache.activemq.command.ActiveMQTopic;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
@@ -53,6 +51,7 @@ import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.context.support.StaticApplicationContext;
|
||||
import org.springframework.integration.jms.config.ActiveMqTestUtils;
|
||||
import org.springframework.integration.jms.config.JmsChannelFactoryBean;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
import org.springframework.jms.connection.CachingConnectionFactory;
|
||||
@@ -67,6 +66,7 @@ import org.springframework.messaging.support.GenericMessage;
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
* @author Gunnar Hillert
|
||||
* @author Artem Bilan
|
||||
* @since 2.0
|
||||
*/
|
||||
public class SubscribableJmsChannelTests {
|
||||
@@ -79,16 +79,13 @@ public class SubscribableJmsChannelTests {
|
||||
|
||||
private Destination queue;
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() {
|
||||
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES", "*");
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setup() throws Exception {
|
||||
public void setup() {
|
||||
ActiveMqTestUtils.prepare();
|
||||
ActiveMQConnectionFactory targetConnectionFactory = new ActiveMQConnectionFactory();
|
||||
this.connectionFactory = new CachingConnectionFactory(targetConnectionFactory);
|
||||
targetConnectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
|
||||
targetConnectionFactory.setTrustAllPackages(true);
|
||||
this.connectionFactory = new CachingConnectionFactory(targetConnectionFactory);
|
||||
this.topic = new ActiveMQTopic("testTopic");
|
||||
this.queue = new ActiveMQQueue("testQueue");
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<property name="targetConnectionFactory">
|
||||
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
|
||||
<property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
|
||||
<property name="trustAllPackages" value="true"/>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="sessionCacheSize" value="10"/>
|
||||
|
||||
@@ -77,11 +77,6 @@ public class ExtractRequestReplyPayloadTests {
|
||||
@Autowired
|
||||
ChannelPublishingJmsMessageListener inboundGateway;
|
||||
|
||||
@BeforeClass
|
||||
public static void setup() {
|
||||
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES", "*");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOutboundInboundDefault() {
|
||||
this.outboundGateway.setExtractRequestPayload(true);
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
<int:message-history/>
|
||||
|
||||
<int-jms:channel id="jmsChannel" queue="requestQueue"/>
|
||||
|
||||
|
||||
<int:bridge input-channel="jmsChannel" output-channel="resultChannel"/>
|
||||
|
||||
|
||||
<int:channel id="resultChannel">
|
||||
<int:queue/>
|
||||
</int:channel>
|
||||
|
||||
</int:channel>
|
||||
|
||||
<bean id="requestQueue" class="org.apache.activemq.command.ActiveMQQueue">
|
||||
<constructor-arg value="request.queue."/>
|
||||
</bean>
|
||||
@@ -25,6 +25,7 @@
|
||||
<property name="targetConnectionFactory">
|
||||
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
|
||||
<property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
|
||||
<property name="trustAllPackages" value="true"/>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="sessionCacheSize" value="10"/>
|
||||
|
||||
@@ -21,7 +21,6 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
@@ -29,14 +28,14 @@ import org.mockito.stubbing.Answer;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.history.MessageHistory;
|
||||
import org.springframework.integration.jms.SubscribableJmsChannel;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
||||
import org.springframework.jms.listener.AbstractMessageListenerContainer;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.PollableChannel;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
import org.springframework.integration.history.MessageHistory;
|
||||
import org.springframework.integration.jms.SubscribableJmsChannel;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
||||
import org.springframework.jms.listener.AbstractMessageListenerContainer;
|
||||
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
@@ -45,11 +44,6 @@ import org.springframework.jms.listener.AbstractMessageListenerContainer;
|
||||
*/
|
||||
public class JmsChannelHistoryTests {
|
||||
|
||||
@BeforeClass
|
||||
public static void setup() {
|
||||
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES", "*");
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Test
|
||||
public void testMessageHistory() throws Exception{
|
||||
|
||||
Reference in New Issue
Block a user