jsr343-experts@jms-spec.java.net

[jsr343-experts] (JMS_SPEC-112) add Message.getJMSDeliveryCount()

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Wed, 09 Jan 2013 18:34:31 +0000

"axel_podehl" has logged this JIRA issue:

-------- Original Message --------
(JMS_SPEC-112) add Message.getJMSDeliveryCount()
http://java.net/jira/browse/JMS_SPEC-112

Since a JMSXDeliveryCount will be part of the JMS 2.0 requirement, also the Message interface should reflect this:

public long getJMSDeliveryCount() throws JMSException

------------------------------------------------------------------------------------------------------------------

JMS defines two different type of information which can be associated with a message (apart from the body): message
headers and message properties. Message headers are accessed using specific javabean-like methods such as getJMSPriority
whereas message properties are accessed using generic methods such as getIntProperty(name).

JMSXDeliveryCount was defined (though not made mandatory) in JMS 1.1 and is a message property, not a message header,
which is why it is accessed using setIntProperty and getIntProperty rather than more specific methods. In JMS 2.0 all we
are doing is making this existing property mandatory.

I can see a case for defining specific methods to access the JMS-defined properties (those starting with JMSX), or even
just the mandatory one(s), but there is potential confusion in providing two ways to access the same value. And since
JMSXDeliveryCount was defined in JMS 1.1 it has to remain a property.

So I propose we leave things as they are. However I'll leave this issue open for now to allow for other comments either
via the issue or via the EG/user alias.



Nigel