Description
Christian Schneider opened SPR-5183 and commented
JMSTemplate currently supports QoS settings like: deliveryMode, priority, timeToLive
While this is ok if you want to set these only once it makes some problems if you want to set them new for each message. If you set the properties before doing the send the code is not threadsafe anymore.
See http://fisheye6.atlassian.com/browse/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?r=700236#l251
I have currently ignored the threading problem but I have to correct this before the new CXF version is released. So what I would like to have is a send method that allows setting the QoS stuff like in producer. Alternatively I would be happy if there is some easy workaround.
This is the code that decides about QoS
protected void doSend(MessageProducer producer, Message message) throws JMSException {
if (isExplicitQosEnabled()) {
producer.send(message, getDeliveryMode(), getPriority(), getTimeToLive());
}
else {
producer.send(message);
}
}
Affects: 2.5.5