Bug 736785

Summary: Qpid JCA Adapter -- QpidMessageHandler incorrectly calls message.acknowledge() when being used in an XA transaction
Product: Red Hat Enterprise MRG Reporter: Weston M. Price <wprice>
Component: qpid-jcaAssignee: Weston M. Price <wprice>
Status: CLOSED CURRENTRELEASE QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.0CC: astitcher, cdewolf, jpechane, mvecera, tross
Target Milestone: 2.1.2   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-07 17:41:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to correctly call message.acknowledge() after endpoint.beforeDelivery() none

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.