You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Hiram Chirino (JIRA)" <ji...@apache.org> on 2007/02/26 21:11:03 UTC

[jira] Resolved: (AMQ-1088) TransactionContext class cast exception

     [ https://issues.apache.org/activemq/browse/AMQ-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiram Chirino resolved AMQ-1088.
--------------------------------

    Resolution: Duplicate

Actually patch in AMQ-1054 was already applied.

> TransactionContext class cast exception
> ---------------------------------------
>
>                 Key: AMQ-1088
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1088
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 4.0.1
>         Environment: XP - jre 1.4
>            Reporter: Mary Nicholas
>         Assigned To: Hiram Chirino
>            Priority: Minor
>             Fix For: 4.1.1, 4.2.0
>
>         Attachments: AmqXAPatch.txt
>
>
> 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;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.