Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-3830

RAR Transacted Message Delivery (Option B JCA Spec 13-30) fail to manage Timeoutexception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.5.1, 5.6.0
    • Fix Version/s: None
    • Component/s: Connector
    • Labels:
      None
    • Environment:

      Linux - JBoss 5.5.1 or JBoss 7.1.1 - ActiveMQ 5.5.1/5.6.0

    • Patch Info:
      Patch Available

      Description

      The MDB receives a message within an XA transaction.
      If a timeout occurs, the application server transaction manager move the transaction state to aborted and after ended, rollbacking changes and resetting the transaction id.
      Everything done after delivery of the message is resetted to its initial state.
      When, however, the control returns to ActiveMQSession the transactionContext has been cleaned up so a new local transaction is started.
      At this point is invoked the method ServerSessionImpl.afterDelivery and the the proxy MessageEndpoint (JBoss instance) starts the afterDelivery stuff.
      The application server transaction manager tries to commit a transaction that is already ROLLED_BACK and rise an exception. Returning to ServerSessionImpl.afterDelivery the exception is catched and is executed the finally block, the transaction context is marked as a local so is done a local commit that remove the message from the input queue.
      As result the message has been consumed (lost) but not processed.

      My solution to avoid this problem is to manage in different way the exception (that contains server side information about transaction) to understand if we need to commit or not.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              antonioderrico Antonio D'Errico
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: