[jboss-jira] [JBoss JIRA] Updated: (JBAS-3634) Acknowledgement of transacted message in MessageListener should be inside delivery lock

Adrian Brock (JIRA) jira-events at jboss.com
Thu Sep 21 00:48:55 EDT 2006


     [ http://jira.jboss.com/jira/browse/JBAS-3634?page=all ]

Adrian Brock updated JBAS-3634:
-------------------------------

    Description: 
The acknowledgement of a transacted message for a MessageListener
should be inside the delivery lock.

Otherwise the addition of the acknowledgement could be competing with other
operations on the session, e.g. commit/rollback/recover.


  was:
The acknowledgement of a transacted message for a MessageListener
should be inside the delivery lock.

Otherwise the addition of the acknowledgement could be competing with other
operations on the session, e.g. commit/rollback/recover.

org.jboss.mq.SpyMessageConsumer::run()

+            // Try to obtain the session delivery lock
+           // This avoids concurrent delivery to message listeners in the same session as per spec
+            boolean gotDeliveryLock = false;
+            while (gotDeliveryLock == false)
+            {

            if (session.transacted)
            {
               // REVIEW: for an XASession without a transaction this will ack the message
               // before it has been processed. Plain message listeners
               // are not supported in a j2ee environment, but what if somebody is trying 
               // to be clever?
               if (trace)
                  log.trace("run() acknowledging message in tx mes=" + mes.getJMSMessageID() + " " + this); 
               session.connection.spyXAResourceManager.ackMessage(session.getCurrentTransactionId(), mes);
            }

-            // Try to obtain the session delivery lock
-            // This avoids concurrent delivery to message listeners in the same session as per spec
-            boolean gotDeliveryLock = false;
-            while (gotDeliveryLock == false)
-            {


> Acknowledgement of transacted message in MessageListener should be inside delivery lock
> ---------------------------------------------------------------------------------------
>
>                 Key: JBAS-3634
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3634
>             Project: JBoss Application Server
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>          Components: JMS service
>    Affects Versions: JBossAS-4.0.5.CR1
>            Reporter: Adrian Brock
>         Assigned To: Adrian Brock
>             Fix For: JBossAS-4.0.5.GA
>
>
> The acknowledgement of a transacted message for a MessageListener
> should be inside the delivery lock.
> Otherwise the addition of the acknowledgement could be competing with other
> operations on the session, e.g. commit/rollback/recover.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list