https://issues.apache.org/jira/browse/AMQ-5513 - fix stomp regression - dependency on redelivered flag between stomp and jms is tenuous - but can be reliable via policy as shown

This commit is contained in:
gtully 2015-01-27 15:38:16 +00:00
parent 6c5dd2543e
commit 1e5d212768
1 changed files with 12 additions and 1 deletions

View File

@ -48,6 +48,8 @@ import javax.management.ObjectName;
import org.apache.activemq.broker.TransportConnector;
import org.apache.activemq.broker.jmx.BrokerViewMBean;
import org.apache.activemq.broker.jmx.QueueViewMBean;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTextMessage;
import org.apache.activemq.util.Wait;
@ -120,18 +122,27 @@ public class StompTest extends StompTestSupport {
+ "}}";
}
queue = new ActiveMQQueue(getQueueName());
super.setUp();
stompConnect();
connection = cf.createConnection("system", "manager");
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
queue = new ActiveMQQueue(getQueueName());
connection.start();
xstream = new XStream();
xstream.processAnnotations(SamplePojo.class);
}
@Override
public void applyBrokerPolicies() {
PolicyMap policyMap = new PolicyMap();
PolicyEntry persistRedelivery = new PolicyEntry();
persistRedelivery.setPersistJMSRedelivered(true);
policyMap.put(queue, persistRedelivery);
brokerService.setDestinationPolicy(policyMap);
}
@Override
public void tearDown() throws Exception {
try {