Bug 703622

Summary: Java (org.apache.qpid.client) XAResourceImpl always returns false for isSameRM
Product: Red Hat Enterprise MRG Reporter: William Gomeringer <wgomerin>
Component: qpid-javaAssignee: Weston M. Price <wprice>
Status: CLOSED CURRENTRELEASE QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 1.3CC: bmorriso, cdewolf, gsim, jns, tross
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-29 20:12:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
isSameRMTrueForSameObject test case. none

Description William Gomeringer 2011-05-10 20:09:19 UTC
Description of problem:

The isSameRM method of org.apache.qpid.client.XAResourceImpl always returns false.

The javadoc for isSameRM says ..

"This method is called to determine if the resource manager instance represented by the target object is the same as the resource manager instance represented by the parameter xares ."

which means isSameRM has to return true when invoked with identical objects (Java identity). Clearly, these two XA resources are backed by the same resource manager.

//xaResource1 == xaResource2
XAResource xaResource1 = jmsXAResource;
XAResource xaResource2 = jmsXAResource;

// xaResource1.isSameRM(xaResource2) should be true

Because the Qpid/MRG implementation always returns false, it affects resource enlistment/delistment with our in-house transaction manager.

The source code (lines 213 - 217) of org.apache.qpid.client.XAResourceImpl suggests that this method has not been fully completed.

public boolean isSameRM(XAResource xaResource) throws XAException
{
// TODO : get the server identity of xaResource and compare it with our own one
return false;
}

Version-Release number of selected component (if applicable):

MRG Messaging 1.3

How reproducible:

Every time

Additional info:

isSameRMTrueForSameObject test case attached.

Comment 1 William Gomeringer 2011-05-10 20:10:29 UTC
Created attachment 498146 [details]
isSameRMTrueForSameObject test case.

Comment 2 Weston M. Price 2011-05-18 19:55:39 UTC
I filed a JIRA upstream for this issue and attached the test case. 

https://issues.apache.org/jira/browse/QPID-3263

I have a patch that I will be submitting to review board which fixes the issue. I will update this BZ as the situation warrants.

Comment 4 William Gomeringer 2011-11-11 20:51:06 UTC
What's the status of this bug? https://issues.apache.org/jira/browse/QPID-3263 looks resolved, have we confirmed?

Thanks,
William

Comment 5 William Gomeringer 2011-11-11 21:29:45 UTC
Will this patch be included in the upcoming qpid-java version going into MRG-M 2.1?

Thanks,
William

Comment 6 bmorriso 2012-01-19 16:09:59 UTC
What is the status of this bug? Will this patch be included in the upcoming qpid-java version going into MRG-M 2.1?

Thank you,
Blair Morrison

Comment 7 Weston M. Price 2012-01-19 16:32:40 UTC
Hi Blair,
   The issue upstream is here:

https://issues.apache.org/jira/browse/QPID-3263

It will be included in the next qpid-java release.

Comment 8 Ted Ross 2012-03-29 20:12:26 UTC
Fixed prior to the 0.14 rebase