Bug 736785 - Qpid JCA Adapter -- QpidMessageHandler incorrectly calls message.acknowledge() when being used in an XA transaction
Summary: Qpid JCA Adapter -- QpidMessageHandler incorrectly calls message.acknowledge(...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-jca
Version: 2.0
Hardware: All
OS: All
high
high
Target Milestone: 2.1.2
: ---
Assignee: Weston M. Price
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-08 17:18 UTC by Weston M. Price
Modified: 2016-02-22 00:59 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-07 17:41:38 UTC


Attachments (Terms of Use)
Patch to correctly call message.acknowledge() after endpoint.beforeDelivery() (966 bytes, patch)
2011-09-17 13:28 UTC, Weston M. Price
no flags Details | Diff

Description Weston M. Price 2011-09-08 17:18:25 UTC
As a result of QE's testing, most notably BZ-733383, it was identified that the QpidMessageHandler was incorrectly calling message.acknowlege() after the call to messageEndpoint.onMessage(). This was causing incorrect transactional semantics on the broker as we need to call acknowledge() before the call to onMessage() to line up with the commit/recover calls later in the code. 

This is only applicable to endpoints where delivery needs to run in the context of an XA transaction. Non transactional endpoints, or endpoints using LocalTransactions, the call is done after the call to onMessage().

Comment 1 Andrew Stitcher 2011-09-08 18:19:43 UTC
Is this a new issue or the diagnosis for Bug 733383 ? 

It looks like Bug 733383 should be dependent on this one.

Comment 2 Weston M. Price 2011-09-17 13:26:49 UTC
Reopening as call for acknowledge is still incorrect. I am attaching a patch. Also sent to Andrew Stitcher for integration. Also, I am attaching email conversation with Gordon and Rajith about the underlying issue in the Java client which we are still looking at.

Comment 3 Weston M. Price 2011-09-17 13:28:09 UTC
Created attachment 523710 [details]
Patch to correctly call message.acknowledge() after endpoint.beforeDelivery()

Comment 4 Andrew Stitcher 2011-09-22 13:31:01 UTC
This has been fixed in package qpid-java-jca-0.10-10

Comment 5 Martin Vecera 2011-11-10 13:29:58 UTC
I can confirm that the code is really fixed (decompiled the adapter). I do not have any test that could be executed.


Note You need to log in before you can comment on or make changes to this bug.