Bug 703622 - Java (org.apache.qpid.client) XAResourceImpl always returns false for isSameRM
Summary: Java (org.apache.qpid.client) XAResourceImpl always returns false for isSameRM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java
Version: 1.3
Hardware: All
OS: All
medium
high
Target Milestone: ---
: ---
Assignee: Weston M. Price
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-10 20:09 UTC by William Gomeringer
Modified: 2018-11-27 21:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-29 20:12:26 UTC
Target Upstream Version:


Attachments (Terms of Use)
isSameRMTrueForSameObject test case. (3.04 KB, application/zip)
2011-05-10 20:10 UTC, William Gomeringer
no flags Details

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


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