ari-ban / test2

0 stars 0 forks source link

Incorrect behaviour observed for Message.cleardBody() on a Text Message #22

Closed arinban closed 14 years ago

arinban commented 18 years ago

As Per JMS Spec Clearing a message body using clearBody() method should reset the value of the message body to the 'empty' initial message value as set by the create method provided by Session, but this is not observed while running CTS compatibility test with Sun Java System Application Server 8.2 using genericjmsra 1.0 and IBM MQ 6.0. To reproduce the problem run CTS test under

TS_HOME/src/com/sun/ts/tests/jms/ee/all/messageTopic/MessageTopicTest#msgClearBodyTopicTest

This is also observed in tests under

TS_HOME/src/com/sun/ts/tests/jms/ee/all/messageQueue/MessageQueueTest#msgClearBodyQueueTest

---------[ From JMS spec ]-----------

3.11.1 Clearing a Message Body The clearBody method of Message resets the value of the message body to the ‘empty’ initial message value as set by the message type’s create method provided by Session. Clearing a message’s body does not clear its property entries.

Note: See following URL regarding how to get CTS compatibility tests https://genericjmsra.dev.java.net/issues/show_bug.cgi?id=19

Environment

Operating System: All Platform: Sun

Affected Versions

[1.0]

arinban commented 6 years ago
arinban commented 6 years ago

@arinban Commented

arinban commented 6 years ago

@arinban Commented @arinban Commented

arinban commented 18 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented Reported by raja_perumal

arinban commented 18 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented binod said: Assigning to Ramesh

arinban commented 18 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented rampsarathy said: WSMQ 6.0 exhibits the following behavor

When a message is created ( say a Textmessage) from a session the initial value of getText would return a null.

Refer IBM documentation:

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/jms77s1.htm

But after setting a message on it and them calling clearBody , getText returns an empty string "".

Apparantely the above behavior would fail in CTS suite because null (which is the 'initial' value after the create method) and "" (which is the result of clearBody) do not evaluate as same)

This cannot be fixed in the generic jms ra because its a WSMQ behavior and it is expected that all WSMQ clients are developed according to this behavior.

arinban commented 18 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented rampsarathy said: This is a spec incompatibilty in WS MQ 6.0 implementation, cannot be fixed in RA.

arinban commented 18 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented Was assigned to rampsarathy

arinban commented 7 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented This issue was imported from java.net JIRA GENERICJMSRA-22

arinban commented 14 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented Marked as incomplete on Sunday, September 5th 2010, 8:21:08 pm