jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: (JMS_SPEC-34) Calling setJMSDeliveryMode or setJMSPriority on a javax.jms.Message before it is sent don't have any effect

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Mon, 25 Jul 2011 19:28:33 +0100

On 25/07/2011 18:41, Clebert Suconic wrote:
>>> So I don't think we can deprecate these methods, though we can certainly make the javadoc comments much more
>>> explicit that they are for provider use only.
>
> I honestly don't know of any valid usage for these methods as a SPI.
>
> Even if I receive a message from a different provider, the MessagePriority and DeliveryMode should be ignored as the
> new producer on the second provider will replace them anyway.

JMS says that the consuming application can call getMessagePriority() or getDeliveryMode() on a message that it has just
received. If the message implementation is from a foreign provider then the only way the JMS provider can set these is
using setMessagePriority and setDeliveryMode.

Nigel