jms-spec
  1. jms-spec
  2. JMS_SPEC-56

Enhance the EJB specification to support the delivery of messages in batches to MDBs

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      This is a request for changes to the EJB specification to support the asynchronous delivery of messages to a message-driven bean in batches.

      This new feature is described in JMS_SPEC-36. To support this there will be a new listener interface javax.jms.BatchMessageListener, which provides the method onMessages(Message[] messages).

      Where batch delivery is not required, the existing javax.jms.MessageListener interface and its method onMessage(Message message) will continue to be used as before.

      The following changes to the EJB specification are suggested (references are to the EJB 3.1 specification)

      Section 5.4.2 "The Required Message Listener Interface"


      Change: "The message-driven bean class's implementation of the javax.jms.MessageListenerinterface distinguishes the message-driven bean as a JMS message-driven bean."

      To: "The message-driven bean class's implementation of the javax.jms.MessageListener or javax.jms.BatchMessageListener interface distinguishes the message-driven bean as a JMS message-driven bean."

      An additional node should be added to state that a JMS message-driven bean may implement either of these interfaces or both.

      5.6.2 "Message-Driven Bean Class"


      Change: "In the case of JMS, this is the javax.jms.MessageListener interface."

      To: "In the case of JMS, this is either the javax.jms.MessageListener or javax.jms.BatchMessageListener interface."

      13.6.3.2 "REQUIRED£


      In all four places change: "onMessage method"

      to: "onMessage or onMessages method"

      21.3.5 "JMS 1.1 Requirements"


      Change name of section to: "JMS 2.0 Requirements"

      Change: "An implementation requiring the full EJB 3.1 API must include the JMS 1.1 extension"

      To: "An implementation requiring the full EJB 3.2 API must include JMS 2.0"

      In the fourth paragraph,

      Change: "Enterprise beans must not call the javax.jms.MessageConsumer.setMessageListener or javax.jms.MessageConsumer.getMessageListener method."

      To: "Enterprise beans must not call the javax.jms.MessageConsumer.setMessageListener, javax.jms.MessageConsumer.setBatchMessageListener, javax.jms.MessageConsumer.getMessageListener or javax.jms.MessageConsumer.getBatchMessageListener methods."

      5.4.14 "Activation Configuration Properties"


      This section introduces a list of activation configuration properties for JMS message-driven beans. An additional section should be inserted which describes the additional properties needed for batch delivery:

      Insert new section: 5.4.<n> "Batch delivery" as follows:

      If the JMS Message-driven bean implements the javax.jms.BatchMessageListener interface then the following activation configuration properties may be used to configure batch delivery:

      • batchSize: If set to greater than zero, messages will be delivered by calling the onMessages(Message[] messages) method. The bean class must implement javax.jms.BatchMessageListener. Messages will be delivered in batches of up to batchSize messages. The actual batch size used may be any value between one and the specified batchSize. It is invalid to specify a value greater than zero if the bean class does not implement javax.jms.BatchMessageListener.
      • batchTimeout: If batch delivery is used, this specifies the maximum number of milliseconds that the JMS provider may defer message delivery for in order to assemble a batch of messages that is as large as possible but no larger than the batch size.

        Issue Links

          Activity

          Hide
          Nigel Deakin added a comment -

          This issue has now been forwarded to the EJB 3.2 expert group as EJB_SPEC-44. Please make further comments there, not here.

          Show
          Nigel Deakin added a comment - This issue has now been forwarded to the EJB 3.2 expert group as EJB_SPEC-44 . Please make further comments there, not here.
          Hide
          Nigel Deakin added a comment -

          Following the decision to defer JMS_SPEC-36 (Allow messages to be delivered asynchronously in batches) I am going to close this issue. If changes are needed to the MDB specification in the future a new issue will be logged.

          Show
          Nigel Deakin added a comment - Following the decision to defer JMS_SPEC-36 (Allow messages to be delivered asynchronously in batches) I am going to close this issue. If changes are needed to the MDB specification in the future a new issue will be logged.
          Hide
          Nigel Deakin added a comment -

          Closing as "Won'tFix" because that's the nearest resolution I can see to "withdrawn".

          Show
          Nigel Deakin added a comment - Closing as "Won'tFix" because that's the nearest resolution I can see to "withdrawn".

            People

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

              Dates

              • Created:
                Updated:
                Resolved: