Skip to main content

[jms-spec users] [jsr343-experts] (JMS_SPEC-102) Make JMSConsumer.receivePayload methods consistent with Message.getBody

  • From: Nigel Deakin <nigel.deakin@...>
  • To: jsr343-experts@...
  • Subject: [jms-spec users] [jsr343-experts] (JMS_SPEC-102) Make JMSConsumer.receivePayload methods consistent with Message.getBody
  • Date: Fri, 26 Oct 2012 17:05:24 +0100
  • List-id: <jsr343-experts.jms-spec.java.net>
  • Organization: Oracle Corporation

I have logged this JIRA issue:
http://java.net/jira/browse/JMS_SPEC-102
Make JMSConsumer.receivePayload methods consistent with Message.getBody

JMS_SPEC_64 introduced a new interface JMSConsumer for JMS 2.0. This has methods 
receivePayload(Class<T> c),
receivePayload(Class<T> c, long timeout) and receivePayloadNoWait(Class<T> c).

JMS_SPEC-101 will introduce a new method getBody(Class<T> c).

If JMS_SPEC-101 is agreed then the definition of receivePayload(Class<T> c), 
receivePayload(Class<T> c, long
timeout) and receivePayloadNoWait(Class<T> c) should be amended to make it 
consistent with the definition of
getBody(Class<T> c). Specifically, these methods should allow the specified 
class to be any type to which the
message payload can be assigned.

In addition, the name of these method should be changed to receiveBody(Class<T> c), 
receiveBody(Class<T> c, long
timeout) and receiveBodyNoWait(Class<T> c) since the word "payload" is inconsistent 
with the term "body" which is
used in JMS 1.1.

I will wait until JMS_SPEC-101 is resolved. Then I will make some more specific proposals for changes to receivePayload and receivePayloadNoWait for you to review.

Nigel



[jms-spec users] [jsr343-experts] (JMS_SPEC-102) Make JMSConsumer.receivePayload methods consistent with Message.getBody

Nigel Deakin 10/26/2012

[jms-spec users] Re: [jsr343-experts] (JMS_SPEC-102) Make JMSConsumer.receivePayload methods consistent with Message.getBody

Oleg Tsal-Tsalko 10/26/2012
 
 
Close
loading
Please Confirm
Close