Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
4.0.1
-
None
-
XP - jre 1.4
Description
The class org.apache.activemq.TransactionContext throws a class cast exception on the recover(int flag) method on the line (or at least it does with jdk1.4) return (XATransactionId[]) receipt.getData();
It cannot cast the list of DataStructure[] to XATransactionId[]. I just unpacked it locally as a fix (as seen below) and it worked fine. Have not checked it in though in case others with more experience on this one disagree.
DataStructure[] x = receipt.getData();
if (x.length > 0)
{
XATransactionId xaId[] = new XATransactionId[x.length];
int count = 0;
for (count =0; count < x.length; count++)
xaId[count] = (XATransactionId)x[count];
return xaId;
}
else
return null;
Attachments
Attachments
Issue Links
- duplicates
-
AMQ-1054 XA recover fails for 4.0.1
- Resolved