[jboss-cvs] JBossAS SVN: r57127 - branches/JBoss_3_2_6_JBAS-3677/messaging/src/main/org/jboss/mq
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Sep 25 04:21:42 EDT 2006
Author: darran.lofthouse at jboss.com
Date: 2006-09-25 04:21:40 -0400 (Mon, 25 Sep 2006)
New Revision: 57127
Modified:
branches/JBoss_3_2_6_JBAS-3677/messaging/src/main/org/jboss/mq/SpyMessageConsumer.java
Log:
JBAS-3634 - Acknowledgement of transacted message in MessageListener should be inside delivery lock.
Modified: branches/JBoss_3_2_6_JBAS-3677/messaging/src/main/org/jboss/mq/SpyMessageConsumer.java
===================================================================
--- branches/JBoss_3_2_6_JBAS-3677/messaging/src/main/org/jboss/mq/SpyMessageConsumer.java 2006-09-25 05:01:06 UTC (rev 57126)
+++ branches/JBoss_3_2_6_JBAS-3677/messaging/src/main/org/jboss/mq/SpyMessageConsumer.java 2006-09-25 08:21:40 UTC (rev 57127)
@@ -659,6 +659,13 @@
if (mes instanceof SpyEncapsulatedMessage)
message = ((SpyEncapsulatedMessage) mes).getMessage();
+ //Handle runtime exceptions. These are handled as per the spec if
+ // you assume
+ //the number of times erroneous messages are redelivered in
+ // auto_acknowledge mode
+ //is 0. :)
+ session.obtainDeliveryLock();
+
if (session.transacted)
{
// REVIEW: for an XASession without a transaction this will ack the message
@@ -668,14 +675,8 @@
if (trace)
log.trace("run() acknowledging message in tx mes=" + mes.getJMSMessageID() + " " + this);
session.connection.spyXAResourceManager.ackMessage(session.getCurrentTransactionId(), mes);
- }
-
- //Handle runtime exceptions. These are handled as per the spec if
- // you assume
- //the number of times erroneous messages are redelivered in
- // auto_acknowledge mode
- //is 0. :)
- session.obtainDeliveryLock();
+ }
+
try
{
session.addUnacknowlegedMessage((SpyMessage) message);
More information about the jboss-cvs-commits
mailing list