jms-spec
  1. jms-spec
  2. JMS_SPEC-75

Ambiguous javadocs for Connection.createConnectionConsumer and createDurableConnectionConsumer

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      The JMS 1.1 javadocs for Connection.createConnectionConsumer lists the following possible exceptions:

      JMSException - if the Connection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
      InvalidDestinationException - if an invalid destination is specified.
      InvalidSelectorException - if the message selector is invalid.

      The JMS 1.1 javadocs for Connection.createDurableConnectionConsumer lists the following possible exceptions:

      JMSException - if the Connection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
      InvalidDestinationException - if an invalid destination is specified.
      InvalidSelectorException - if the message selector is invalid.

      So what exception is thrown if a invalid message selector is supplied? An InvalidSelectorException (since the message selector is invalid) or a JMSException (invalid argument for messageSelector).

      Since a InvalidSelectorException is a subtype of JMSException then it would be safe to return a InvalidSelectorException, but the javadocs as they stand are contradictory.

        Activity

        Hide
        Nigel Deakin added a comment -

        This didn't make it into JMS 2.0 and so is carried forward to JMS 2.1.

        Show
        Nigel Deakin added a comment - This didn't make it into JMS 2.0 and so is carried forward to JMS 2.1.

          People

          • Assignee:
            Unassigned
            Reporter:
            Nigel Deakin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: