[
https://issues.apache.org/jira/browse/AMQ-4634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13711637#comment-13711637
]
Gary Tully commented on AMQ-4634:
---------------------------------
@Gaston I think your issue is fixed by http://svn.apache.org/r1504279
the only caveat is that my use case does not need a call to another ejb. The
scenario was an MDB spending longer than the TM timeout in onMessage so that
the CMT had aborted on its return from onMessage. That was enough to loose a
message through an auto ack in a local transaction. All in error.
Can you try out tonights snapshot to verify?
many thanks :-)
> Losing messages when there is a XA trx timeout
> ----------------------------------------------
>
> Key: AMQ-4634
> URL: https://issues.apache.org/jira/browse/AMQ-4634
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.6.0, 5.7.0, 5.8.0
> Environment: JBoss 6.1.
> ActiveMQ 5.8.0 (also tested in 5.7.0 and 5.6.0) standalone mode.
> Reporter: Gaston
> Assignee: Gary Tully
> Attachments: logs.txt
>
>
> ActiveMQ does a trx commit when there is a transaction timeout
> (EJBTransactionRolledbackException). In this way we are losing messages when
> there is any timeout.
> We have seen that the activemq connections are enlist in XA.
> The attribute transactionContext from ActiveMQSession class has the global
> transaction reference (xid) before calling the MDB
> (messageListener.onMessage(message)).
> When the timeout is reached and the RuntimeException is throwned, the
> transactionContext losed the xid reference.
> Later, when ActiveMQSession call the method
> transactionContext.isInXATransaction() the result is false because there is
> no xid reference.
> This situation only happened when the MDB calls other EJB (Stateless) with
> CMT - TransactionAttributeType.REQUIRES_NEW, and the exception is throwed
> inside the Stateless.
> I've tried to reproduce this without calling the stateless ejb but it works
> well.
> The ActiveMQSession class should retain the original transactionContext.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira