arindam-bandyopadhyay / issue-test

0 stars 0 forks source link

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

Closed arinban closed 6 years ago

arinban commented 6 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

Original Issue:https://github.com/javaee/glassfish-genericjmsra/issues/22 Raised By:@glassfishrobot Created at:Fri Mar 31 10:11:18 IST 2006 Assigned To:@glassfishrobot

arinban commented 6 years ago

@glassfishrobot Commented on Fri Mar 31 10:11:18 IST 2006 Reported by raja_perumal

arinban commented 6 years ago

@glassfishrobot Commented on Mon Apr 03 14:50:16 IST 2006 binod said: Assigning to Ramesh

arinban commented 6 years ago

@glassfishrobot Commented on Mon Jun 05 03:14:17 IST 2006 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 6 years ago

@glassfishrobot Commented on Tue Jun 06 08:50:29 IST 2006 rampsarathy said: This is a spec incompatibilty in WS MQ 6.0 implementation, cannot be fixed in RA.

arinban commented 6 years ago

@glassfishrobot Commented on Fri Mar 31 10:11:18 IST 2006 Was assigned to rampsarathy

arinban commented 6 years ago

@glassfishrobot Commented on Mon Apr 24 13:02:20 IST 2017 This issue was imported from java.net JIRA GENERICJMSRA-22

arinban commented 6 years ago

@glassfishrobot Commented on Mon Sep 06 08:51:08 IST 2010 Marked as incomplete on Sunday, September 5th 2010, 8:21:08 pm

arinban commented 6 years ago

@glassfishrobot Closed the issue on Mon Sep 06 08:51:08 IST 2010