arindam-bandyopadhyay / issue-test

0 stars 0 forks source link

AUTO_ACKNOWLEDGE MessageListener doesn't work as per the JMS spec #28

Closed arinban closed 6 years ago

arinban commented 6 years ago

As per JMS spec for AUTO_ACKNOLEDGE Message Listener the following behaviour is expected but this is not observed when running CTS compatibility tests using Sun Java System Application Server 8.2 PE with jmsgenericra 1.0 and IBM MQ 6.0

TS_HOME/src/com/sun/ts/tests/ee/appclient/queuetests/QueueTests#autoAckMsgListenerQueueTests -------[ From JMS Spec]------------- 4.4.11 Message Acknowledgment If a session is transacted, message acknowledgment is handled automatically by commit, and recovery is handled automatically by rollback. If a session is not transacted, there are three acknowledgment options, and recovery is handled manually: AUTO_ACKNOWLEDGE - With this option, the session automatically acknowledges a client’s receipt of a message when it has either successfully returned from a call to receive or the MessageListener it has called to process the message successfully returns.


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/21 Raised By:@glassfishrobot Created at:Fri Mar 31 09:44:24 IST 2006 Assigned To:@glassfishrobot

arinban commented 6 years ago

@glassfishrobot Commented on Fri Mar 31 09:44:24 IST 2006 Reported by raja_perumal

arinban commented 6 years ago

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

arinban commented 6 years ago

@glassfishrobot Commented on Thu Jun 15 08:01:59 IST 2006 rampsarathy said: Tested it with stand alone MQ series client.

When the session is AUTO_ACK session then calling a recover on the session should reset the message delivery and also re-deliver all unacked messages.

For e.g

onMessage(Message msg)

{ System.out.println("Message is " + msg); session.recover(); }

According to the CTS the way the above code behaves should be as follows.

It prints out the message on receiving it, and since recover is called ( before the message is acknowledged) the mesage should be redelivered with the redeliverd flag, and this would happen forever untill the redelivery attempts run out . In WS MQ this does not happen and the message is delivered only once. So the CTS test fails. Some more clarification is required in the spec for session recovery in AUTO_ACK sessions. Different brokers may have different ways of implementing AUTO_ACKS. This does not have anything to do with the Generic JMS RA.

arinban commented 6 years ago

@glassfishrobot Commented on Fri Mar 31 09:44:24 IST 2006 Was assigned to rampsarathy

arinban commented 6 years ago

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

arinban commented 6 years ago

@glassfishrobot Commented on Mon Sep 06 08:51:08 IST 2010 Marked as fixed 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