ari-ban / glassfish-genericjmsra

0 stars 0 forks source link

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

Closed arinban closed 14 years ago

arinban commented 18 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
arinban commented 18 years ago

@glassfishrobot Commented Reported by raja_perumal

arinban commented 18 years ago

@glassfishrobot Commented binod said: Assigning to Ramesh

arinban commented 18 years ago

@glassfishrobot Commented 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 18 years ago

@glassfishrobot Commented Was assigned to rampsarathy

arinban commented 7 years ago

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

arinban commented 14 years ago

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