activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mary Nicholas (JIRA)" <>
Subject [jira] Created: (AMQ-1088) TransactionContext class cast exception
Date Tue, 05 Dec 2006 14:15:02 GMT
TransactionContext class cast exception

                 Key: AMQ-1088
             Project: ActiveMQ
          Issue Type: Bug
          Components: Connector
    Affects Versions: 4.0.1
         Environment: XP - jre 1.4
            Reporter: Mary Nicholas
            Priority: Minor

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;
      return null;

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message