jms-spec
  1. jms-spec
  2. JMS_SPEC-60

Obscurity setting special JMSHeaders

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      Currently it is specced that some headers can only set by "send or publish" method.
      This is very confusing. For example someone not knowing about this might be tempted to set JMSPriority on a message.
      This will not trigger any exception, but in the end be completely ignored if send by he regular send method (.send(message)) instead of the overloaded send(message, deliveryMode, priority, timeToLive).
      The question is; why are these headers mutable on the javax.jms.Message in the first place?

        Issue Links

          Activity

          Hide
          rdohna added a comment -

          We assume that the setters are there for cross-provider posting, i.e. a client consumes a message from a destination bound to one JMS provider (say Glassfish MQ) and resends it to a destination bound to another JMS provider (say Active MQ). The outgoing provider may want to set the priority of that message object, while it doesn't know which implementation it is.

          But you are right: It's very confusing.

          Show
          rdohna added a comment - We assume that the setters are there for cross-provider posting, i.e. a client consumes a message from a destination bound to one JMS provider (say Glassfish MQ) and resends it to a destination bound to another JMS provider (say Active MQ). The outgoing provider may want to set the priority of that message object, while it doesn't know which implementation it is. But you are right: It's very confusing.
          Hide
          Nigel Deakin added a comment -

          Changing Issue Type to "Improvement"
          Changing priority to "Low priority"

          Show
          Nigel Deakin added a comment - Changing Issue Type to "Improvement" Changing priority to "Low priority"
          Hide
          Nigel Deakin added a comment -

          This issue is a duplicate of JMS_SPEC-34

          I've added some additional information to JMS_SPEC-34 which explains why these methods are needed and confirms that the javadoc will be clarified.

          I'll close this issue as a duplicate. Feel free to continue any discussion on JMS_SPEC-34

          Show
          Nigel Deakin added a comment - This issue is a duplicate of JMS_SPEC-34 I've added some additional information to JMS_SPEC-34 which explains why these methods are needed and confirms that the javadoc will be clarified. I'll close this issue as a duplicate. Feel free to continue any discussion on JMS_SPEC-34
          Hide
          Nigel Deakin added a comment -

          Corrected "Affects version" to 1.1.

          Show
          Nigel Deakin added a comment - Corrected "Affects version" to 1.1.

            People

            • Assignee:
              Unassigned
              Reporter:
              koen.serneels
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: